WebProcessCache should keep track of processes being added
[WebKit-https.git] / LayoutTests / webaudio / web-audio-is-playing.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4     <script src="../resources/js-test-pre.js"></script>
5 </head>
6 <body>
7     <script>
8         description("Testing Page::isPlayingAudio() with web audio");
9
10         jsTestIsAsync = true;
11
12         if (window.internals)
13             shouldBeFalse("window.internals.pageMediaState().includes('IsPlayingAudio')");
14
15         var context = new webkitAudioContext();
16         var frequency = 300;
17         var oscillator = context.createOscillator();
18
19         if (window.internals)
20             shouldBeFalse("window.internals.pageMediaState().includes('IsPlayingAudio')");
21
22         oscillator.frequency.value = frequency;
23         oscillator.type = 0;
24         oscillator.connect(context.destination);
25         oscillator.start(0);
26
27         shouldBecomeEqual("window.internals.pageMediaState().includes('IsPlayingAudio')", "true", finishJSTest);
28     </script>
29     <script src="../resources/js-test-post.js"></script>
30 </body>
31 </html>