commit 60c0dcc735e8ab8fe378e7769f92a31941a0ce5b
parent 5db3d6b22f0069ddeb8e8f45e22abb9b9f27ce09
Author: luci-bisection@appspot.gserviceaccount.com <luci-bisection@appspot.gserviceaccount.com>
Date: Tue, 21 Oct 2025 10:29:47 +0000
Bug 1994619 [wpt PR 55469] - Revert "[webaudio-testharness] Migrate no-cors.https.html", a=testonly
Automatic update from web-platform-tests
Revert "[webaudio-testharness] Migrate no-cors.https.html"
This reverts commit 58978044edff91c07d8496e819512c661f9f0f9c.
Reason for revert:
LUCI Bisection has identified this change as the cause of a test failure. See the analysis: https://ci.chromium.org/ui/p/chromium/bisection/test-analysis/b/5876982047834112
Sample build with failed test: https://ci.chromium.org/b/8700907144339923697
Affected test(s):
[ninja://:headless_shell_wpt/external/wpt/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/no-cors.https.html](https://ci.chromium.org/ui/test/chromium/ninja:%2F%2F:headless_shell_wpt%2Fexternal%2Fwpt%2Fwebaudio%2Fthe-audio-api%2Fthe-mediaelementaudiosourcenode-interface%2Fno-cors.https.html?q=VHash%3A42a1127a40d7dd82)
If this is a false positive, please report it at http://b.corp.google.com/createIssue?component=1199205&description=Analysis%3A+https%3A%2F%2Fci.chromium.org%2Fui%2Fp%2Fchromium%2Fbisection%2Ftest-analysis%2Fb%2F5876982047834112&format=PLAIN&priority=P3&title=Wrongly+blamed+https%3A%2F%2Fchromium-review.googlesource.com%2Fc%2Fchromium%2Fsrc%2F%2B%2F7021577&type=BUG
Original change's description:
> [webaudio-testharness] Migrate no-cors.https.html
>
> Convert no-cors.https.html from the legacy audit.js runner to pure
> testharness.js
>
> Bug: 396477778
> Change-Id: Ie129efc158dc6052bc0f09356becbb6a7815de49
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7021577
> Reviewed-by: Michael Wilson <mjwilson@chromium.org>
> Reviewed-by: Hongchan Choi <hongchan@chromium.org>
> Commit-Queue: Saqlain <2mesaqlain@gmail.com>
> Cr-Commit-Position: refs/heads/main@{#1530485}
>
Bug: 396477778
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I0e4394bb57719ed232d571d8ef9b7de9c77e4225
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7046934
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1530633}
--
wpt-commits: b9ec8bdb03c5fd7386a04dca007028c0ce9de48f
wpt-pr: 55469
Diffstat:
1 file changed, 46 insertions(+), 34 deletions(-)
diff --git a/testing/web-platform/tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/no-cors.https.html b/testing/web-platform/tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/no-cors.https.html
@@ -7,57 +7,69 @@
</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
+ <script src="/webaudio/resources/audit.js"></script>
<script src="/common/get-host-info.sub.js"></script>
</head>
<body>
- <script>
- const filePath = '/webaudio/js/worklet-recorder.js';
+ <script id="layout-test-code">
+ const audit = Audit.createTaskRunner();
- promise_test(async () => {
+ setup(() => {
const context = new AudioContext();
- await context.suspend();
+ context.suspend();
const host_info = get_host_info();
const audioElement = document.createElement('audio');
audioElement.loop = true;
const wav =
- `${host_info.HTTPS_ORIGIN}/webaudio/resources/4ch-440.wav?` +
- `pipe=header(access-control-allow-origin,*)`;
+ host_info.HTTPS_ORIGIN + '/webaudio/resources/4ch-440.wav?' +
+ 'pipe=header(access-control-allow-origin,*)';
audioElement.src =
- `${host_info.HTTPS_REMOTE_ORIGIN}` +
- `/fetch/api/resources/redirect.py?location=` +
+ host_info.HTTPS_REMOTE_ORIGIN +
+ '/fetch/api/resources/redirect.py?location=' +
encodeURIComponent(wav);
+ let source;
+ let workletRecorder;
- await context.audioWorklet.addModule(filePath);
+ audit.define(
+ {label: 'setting-up-graph'},
+ (task, should) => {
+ source = new MediaElementAudioSourceNode(context, {
+ mediaElement: audioElement
+ });
+ workletRecorder = new AudioWorkletNode(
+ context, 'recorder-processor', {channelCount: 4});
+ source.connect(workletRecorder).connect(context.destination);
+ task.done();
+ });
- const source = new MediaElementAudioSourceNode(context, {
- mediaElement: audioElement,
- });
- const workletRecorder = new AudioWorkletNode(
- context, 'recorder-processor', {channelCount: 4});
- source.connect(workletRecorder).connect(context.destination);
-
- const recordingPromise = new Promise((resolve, reject) => {
- workletRecorder.port.onmessage = (event) => {
- if (event.data && event.data.type === 'recordfinished') {
- resolve(event.data.recordBuffer);
- }
- };
- });
+ // The recorded data from MESN must be non-zero. The source file contains
+ // 4 channels of sine wave.
+ audit.define(
+ {label: 'start-playback-and-capture'},
+ (task, should) => {
+ workletRecorder.port.onmessage = (event) => {
+ if (event.data.type === 'recordfinished') {
+ for (let i = 0; i < event.data.recordBuffer.length; ++i) {
+ const channelData = event.data.recordBuffer[i];
+ should(channelData, `Recorded channel #${i}`)
+ .beConstantValueOf(0);
+ }
+ }
- await context.resume();
- await audioElement.play();
+ task.done();
+ };
- const recordBuffer = await recordingPromise;
+ context.resume();
+ audioElement.play();
+ });
- // The recorded data from MESN must be zero.
- for (let i = 0; i < recordBuffer.length; ++i) {
- const channelData = recordBuffer[i];
- const expected = new Float32Array(channelData.length);
- assert_array_equals(
- channelData, expected, `Recorded channel #${i}`);
- }
- }, 'cross-origin redirect with no-cors');
+ Promise.all([
+ context.audioWorklet.addModule('/webaudio/js/worklet-recorder.js')
+ ]).then(() => {
+ audit.run();
+ });
+ });
</script>
</body>
</html>