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