Changeset 275468 in webkit
- Timestamp:
- Apr 5, 2021 6:13:53 PM (3 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r275466 r275468 1 2021-04-05 Philippe Normand <pnormand@igalia.com> 2 3 [ macOS ] media/webaudio-background-playback.html is a flakey text failure 4 https://bugs.webkit.org/show_bug.cgi?id=221935 5 <rdar://problem/74370844> 6 7 Reviewed by Eric Carlson. 8 9 The test was flaky because it was checking if the destination had processed new buffers 10 immediately after an asynchronous state change. The proposed solution is to monitor the 11 statechange event and do the actual test after another additional 100 milli-seconds have 12 passed. 13 14 * media/webaudio-background-playback.html: 15 1 16 2021-04-05 Saam Barati <sbarati@apple.com> 2 17 -
trunk/LayoutTests/media/webaudio-background-playback.html
r271779 r275468 83 83 assert_true(onProcessCount == oldOnProcessCount, "audio playback suspended in background"); 84 84 85 // Context state changes are asynchronous, so delay the test to until the context has restarted + 100 additional milli-seconds. 86 context.onstatechange = () => { 87 setTimeout(() => { 88 assert_true(onProcessCount > oldOnProcessCount, "audio resumed playing in the foreground"); 89 }, 100); 90 }; 91 85 92 if (window.internals) 86 93 internals.applicationWillEnterForeground(); 87 oldOnProcessCount = onProcessCount;88 await new Promise(resolve => setTimeout(resolve, 100));89 assert_true(onProcessCount > oldOnProcessCount, "audio resumed playing in the foreground");90 91 94 92 95 }, "Ensure WebAudio stops playing in the background when the 'BackgroundProcessPlaybackRestricted' restriction is set");
Note: See TracChangeset
for help on using the changeset viewer.