Skip to content

Commit

Permalink
NEW TEST(275558@main): [ MacOS iOS ] media/now-playing-webaudio.html …
Browse files Browse the repository at this point in the history
…is a flaky failure

rdar://124968584
https://bugs.webkit.org/show_bug.cgi?id=271178

Reviewed by Chris Dumez.

Some audio nodes maybe collected even if the audio context is rendering.
This might change the aduio rendering and the now playing info.
Update the test to workaround this until https://bugs.webkit.org/show_bug.cgi?id=271227 is investigated.

* LayoutTests/media/now-playing-webaudio.html:

Canonical link: https://commits.webkit.org/276397@main
  • Loading branch information
youennf committed Mar 20, 2024
1 parent 1a69a06 commit 4f8535c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions LayoutTests/media/now-playing-webaudio.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,23 @@
await waitFor(50);
}

let context;
let oscillator;
let gainNode;

promise_test(async test => {
if (!window.internals)
return;

navigator.audioSession.type = "playback";

let context = new AudioContext();
context = new AudioContext();

await waitFor(100);
assert_false(!!internals.nowPlayingState.uniqueIdentifier);

let oscillator = null;
let gainNode = context.createGain();
oscillator = null;
gainNode = context.createGain();
oscillator = context.createOscillator();
oscillator.type = 'square';
oscillator.frequency.setValueAtTime(440, context.currentTime);
Expand Down

0 comments on commit 4f8535c

Please sign in to comment.