Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / webaudio / audiocontext-state-interrupted-expected.txt
1 Basic tests for AudioNode API.
2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5 PASS context.state is "suspended"
6 node.connect(context.destination)
7 EVENT statechange
8 PASS context.state is "running"
9
10 Test 1: resume() while interrupted is resolved after the interruption ends.
11 internals.beginMediaSessionInterruption("System")
12 EVENT statechange
13 PASS context.state is "interrupted"
14 internals.setMediaSessionRestrictions("WebAudio", "InterruptedPlaybackNotPermitted")
15 Calling context.resume()
16 Delaying 100ms
17 PASS context.state is "interrupted"
18 internals.endMediaSessionInterruption("MayResumePlaying")
19 PASS context.resume() promise resolved
20 PASS context.state is "running"
21
22 Test 2: resume() while interrupted will cause interruption to end.
23 internals.beginMediaSessionInterruption("System")
24 EVENT statechange
25 PASS context.state is "interrupted"
26 internals.setMediaSessionRestrictions("WebAudio", "")
27 Calling context.resume()
28 PASS context.resume() promise resolved
29 PASS context.state is "running"
30
31 Test 3: running AudioContexts will not resume after an interruption ends.
32 internals.beginMediaSessionInterruption("System")
33 EVENT statechange
34 PASS context.state is "interrupted"
35 internals.endMediaSessionInterruption("")
36 EVENT statechange
37 PASS context.state is "suspended"
38
39 Test 4: resume() while interrupted will not resume playback after an interruption.
40 internals.setMediaSessionRestrictions("WebAudio", "InterruptedPlaybackNotPermitted")
41 internals.beginMediaSessionInterruption("System")
42 EVENT statechange
43 PASS context.state is "interrupted"
44 Calling context.resume()
45 internals.endMediaSessionInterruption("")
46 EVENT statechange
47 PASS context.state is "suspended"
48 PASS successfullyParsed is true
49
50 TEST COMPLETE
51