OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="resources/audio-testing.js"></script> | 4 <script src="resources/audio-testing.js"></script> |
5 <script src="../resources/js-test.js"></script> | 5 <script src="../resources/js-test.js"></script> |
| 6 <script src="resources/compatibility.js"></script> |
6 </head> | 7 </head> |
7 | 8 |
8 <body> | 9 <body> |
9 <div id="description"></div> | 10 <div id="description"></div> |
10 <div id="console"></div> | 11 <div id="console"></div> |
11 | 12 |
12 <script> | 13 <script> |
13 description("Test AudioContext activeSourceCount and AudioBufferSourceNode playb
ackState."); | 14 description("Test AudioContext activeSourceCount and AudioBufferSourceNode playb
ackState."); |
14 | 15 |
15 // Create a few sources that start and end playing at various times. After rend
ering, check that | 16 // Create a few sources that start and end playing at various times. After rend
ering, check that |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 function runTest() | 99 function runTest() |
99 { | 100 { |
100 if (window.testRunner) { | 101 if (window.testRunner) { |
101 testRunner.dumpAsText(); | 102 testRunner.dumpAsText(); |
102 testRunner.waitUntilDone(); | 103 testRunner.waitUntilDone(); |
103 } | 104 } |
104 | 105 |
105 window.jsTestIsAsync = true; | 106 window.jsTestIsAsync = true; |
106 | 107 |
107 // Create offline audio context, rendering for renderTime seconds. | 108 // Create offline audio context, rendering for renderTime seconds. |
108 context = new webkitOfflineAudioContext(2, timeToSampleFrame(renderTime, sam
pleRate), sampleRate); | 109 context = new OfflineAudioContext(2, timeToSampleFrame(renderTime, sampleRat
e), sampleRate); |
109 | 110 |
110 // This is only used so we can access the playback state constants. | 111 // This is only used so we can access the playback state constants. |
111 var bufferSource = context.createBufferSource(); | 112 var bufferSource = context.createBufferSource(); |
112 | 113 |
113 // Dummy message so we know how long we're rendering so we can interpret the
pass/fail messages | 114 // Dummy message so we know how long we're rendering so we can interpret the
pass/fail messages |
114 // correctly. | 115 // correctly. |
115 testPassed("Rendering time is " + renderTime + " seconds."); | 116 testPassed("Rendering time is " + renderTime + " seconds."); |
116 | 117 |
117 // Test unscheduled state. Create 3 second source, but don't schedule it. | 118 // Test unscheduled state. Create 3 second source, but don't schedule it. |
118 | 119 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 context.startRendering(); | 172 context.startRendering(); |
172 } | 173 } |
173 | 174 |
174 runTest(); | 175 runTest(); |
175 successfullyParsed = true; | 176 successfullyParsed = true; |
176 | 177 |
177 </script> | 178 </script> |
178 | 179 |
179 </body> | 180 </body> |
180 </html> | 181 </html> |
OLD | NEW |