1 Test suspend/resume for an (offline) AudioContext
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 PASS offlineContext = new OfflineAudioContext(1, durationInSeconds * sampleRate, sampleRate) did not throw exception.
7 PASS offlineContext.state is "suspended"
8 PASS p1 = offlineContext.suspend() did not throw exception.
9 PASS p1 is an instance of Promise
10 PASS offlineContext.suspend() was correctly rejected: InvalidAccessError: cannot suspend an OfflineAudioContext
11 PASS p2 = offlineContext.resume() did not throw exception.
12 PASS p2 is an instance of Promise
13 PASS offlineContext.state is "suspended"
14 PASS offlineContext.resume() was correctly rejected: InvalidAccessError: cannot resume an OfflineAudioContext
15 PASS p3 = offlineContext.startRendering() did not throw exception.
16 PASS offlineContext.state is "closed"
17 PASS offlineContext.suspend() on a closed context rejected: InvalidAccessError: cannot suspend an OfflineAudioContext
18 PASS offlineContext.resume() on a closed context rejected: InvalidAccessError: cannot resume an OfflineAudioContext
19 PASS successfullyParsed is true