commit 15a386376aa54f1442d7de94fe0542f742865fdb
parent 52c11ffb13e5cfdece0c45d5984c9b2372dbcad8
Author: Saqlain <2mesaqlain@gmail.com>
Date: Thu, 9 Oct 2025 20:38:50 +0000
Bug 1992499 [wpt PR 55242] - WebAudio: Merge promise_tests in simple-input-output.https.html, a=testonly
Automatic update from web-platform-tests
WebAudio: Merge promise_tests in simple-input-output.https.html
The test had two promise_test() blocks that assumed sequential
execution. WPT does not guarantee order, causing intermittent failures.
Merged the initialization and processing checks into a single
promise_test() to ensure deterministic behavior.
Bug: 446563923
Change-Id: I7a207260667602a7c41c3b83aee2c36d8ebb9833
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6994883
Commit-Queue: Saqlain <2mesaqlain@gmail.com>
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Reviewed-by: Michael Wilson <mjwilson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1524998}
--
wpt-commits: 06d9feb17bd31e1ea1cd5d4ed2c47de23574185d
wpt-pr: 55242
Diffstat:
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/testing/web-platform/tests/webaudio/the-audio-api/the-audioworklet-interface/simple-input-output.https.html b/testing/web-platform/tests/webaudio/the-audio-api/the-audioworklet-interface/simple-input-output.https.html
@@ -20,21 +20,16 @@
// Location of the worklet's code
const filePath = 'processors/add-offset.js';
- // Context to be used for the tests.
- let context;
-
promise_test(async () => {
// Two channels for testing. Channel 0 is the output of the
// AudioWorklet. Channel 1 is the oscillator so we can compare
// the outputs.
- context = new OfflineAudioContext(
+ const context = new OfflineAudioContext(
{numberOfChannels: 2, length: sampleRate, sampleRate: sampleRate});
// Load up the code for the worklet.
await context.audioWorklet.addModule(filePath);
- }, 'Initialize worklet: Creation of AudioWorklet');
- promise_test(async () => {
const merger = new ChannelMergerNode(
context, {numberOfChannels: context.destination.channelCount});
merger.connect(context.destination);
@@ -73,7 +68,7 @@
ch0.slice(stopFrame),
new Float32Array(ch0.slice(stopFrame).length).fill(offset),
`AudioWorklet output[${stopFrame}:]`);
- }, 'test: Simple AudioWorklet I/O');
+ }, 'Simple AudioWorklet I/O');
</script>
</body>
</html>