| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 | 3 |
| 4 <head> | 4 <head> |
| 5 <script src="../resources/js-test.js"></script> | 5 <script src="../resources/js-test.js"></script> |
| 6 <script src="resources/compatibility.js"></script> | 6 <script src="resources/compatibility.js"></script> |
| 7 <script src="resources/audit-util.js"></script> |
| 7 <script src="resources/audio-testing.js"></script> | 8 <script src="resources/audio-testing.js"></script> |
| 8 <script src="resources/late-start-testing.js"></script> | 9 <script src="resources/late-start-testing.js"></script> |
| 9 </head> | 10 </head> |
| 10 | 11 |
| 11 <body> | 12 <body> |
| 12 <script> | 13 <script> |
| 13 description('Test the late call of start(0) of Oscillator.'); | 14 description('Test the late call of start(0) of Oscillator.'); |
| 14 window.jsTestIsAsync = true; | 15 window.jsTestIsAsync = true; |
| 15 | 16 |
| 16 var audit = Audit.createTaskRunner(); | 17 var audit = Audit.createTaskRunner(); |
| 17 | 18 |
| 18 var sampleRate = 44100; | 19 var sampleRate = 44100; |
| 19 | 20 |
| 20 // The long render length (20 seconds) is to make sure the |onstatechange| | 21 // The long render length (20 seconds) is to make sure the |onstatechange| |
| 21 // event gets fired to start the source, which can take quite a bit of time. | 22 // event gets fired to start the source, which can take quite a bit of time. |
| 22 var renderLength = 20; | 23 var renderLength = 20; |
| 23 | 24 |
| 24 var context = new OfflineAudioContext(1, sampleRate * renderLength, sampleRa
te); | 25 var context = new OfflineAudioContext(1, sampleRate * renderLength, sampleRa
te); |
| 25 var osc = context.createOscillator(); | 26 var osc = context.createOscillator(); |
| 26 | 27 |
| 27 // Test the oscillator node is rendered correctly when the start time of sta
rt() | 28 // Test the oscillator node is rendered correctly when the start time of sta
rt() |
| 28 // call is in the past in terms of the context time. | 29 // call is in the past in terms of the context time. |
| 29 runLateStartTest(audit, context, osc); | 30 runLateStartTest(audit, context, osc); |
| 30 | 31 |
| 31 successfullyParsed = true; | 32 successfullyParsed = true; |
| 32 </script> | 33 </script> |
| 33 </body> | 34 </body> |
| 34 | 35 |
| 35 </html> | 36 </html> |
| OLD | NEW |