tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit c94cbb5443af57f47e3500f31368ae9be0c9517a
parent 4718fd35d2f4bf018a9ed805a9334b812a135335
Author: punithbnayak <punithbnayak@chromium.org>
Date:   Mon, 10 Nov 2025 22:20:17 +0000

Bug 1998998 [wpt PR 55944] - webaudio-testharness] Migrate audiochannelmerger-input-non-default.html, a=testonly

Automatic update from web-platform-tests
webaudio-testharness] Migrate audiochannelmerger-input-non-default.html

Convert audiochannelmerger-input-non-default.html from the legacy
audit.js runner to pure testharness.js

Change-Id: Iaaaa81a69b38395bdab3b364983ed947a7c09f04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7104219
Reviewed-by: Dibyajyoti Pal <dibyapal@chromium.org>
Commit-Queue: Punith Nayak <punithbnayak@chromium.org>
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1541926}

--

wpt-commits: e41de917a689cdb4097f380d18674c2fd6550edd
wpt-pr: 55944

Diffstat:
Mtesting/web-platform/tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-input-non-default.html | 36++++++++++++++----------------------
1 file changed, 14 insertions(+), 22 deletions(-)

diff --git a/testing/web-platform/tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-input-non-default.html b/testing/web-platform/tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-input-non-default.html @@ -2,23 +2,19 @@ <html> <head> <title> - audiochannelmerger-input-non-default.html + ChannelMergerNode: Non-Default Input Handling </title> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/webaudio/resources/audit-util.js"></script> - <script src="/webaudio/resources/audit.js"></script> <script src="/webaudio/resources/merger-testing.js"></script> </head> <body> - <script id="layout-test-code"> - let audit = Audit.createTaskRunner(); - - + <script> // Task: Check if an inactive input renders a silent mono channel in the // output. - audit.define('silent-channel', (task, should) => { - testMergerInput(should, { + promise_test(async () => { + await testMergerInput_W3CTH({ numberOfChannels: 7, // Create a mono source buffer filled with '1'. @@ -29,14 +25,13 @@ // 7th channel should be '1'. expected: [0, 0, 0, 0, 0, 0, 1], - }).then(() => task.done()); - }); - + }); + }, 'silent-channel'); // Task: Check if a stereo input is being down-mixed to mono channel // correctly based on the mixing rule. - audit.define('stereo-down-mixing', (task, should) => { - testMergerInput(should, { + promise_test(async () => { + await testMergerInput_W3CTH({ numberOfChannels: 7, // Create a stereo buffer filled with '1' and '2' for left and right @@ -49,14 +44,13 @@ // The result of summed and down-mixed stereo audio should be 1.5. // (= 1 * 0.5 + 2 * 0.5) expected: [0, 0, 0, 0, 0, 0, 1.5], - }).then(() => task.done()); - }); - + }); + }, 'stereo-down-mixing'); // Task: Check if 3-channel input gets processed by the 'discrete' mixing // rule. - audit.define('undefined-channel-layout', (task, should) => { - testMergerInput(should, { + promise_test(async () => { + await testMergerInput_W3CTH({ numberOfChannels: 7, // Create a 3-channel buffer filled with '1', '2', and '3' @@ -70,10 +64,8 @@ // not a canonical layout, so the input channel 2 and 3 should be // dropped by 'discrete' mixing rule. expected: [0, 0, 0, 0, 0, 0, 1], - }).then(() => task.done()); - }); - - audit.run(); + }); + }, 'undefined-channel-layout'); </script> </body> </html>