Index: third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource.html |
diff --git a/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource.html b/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource.html |
index c21ead7aaaa0d7db51b9dd46b3ee2454b6cc087f..f11c6ca572765ebe766f9fef7e4db9d091ba5a92 100644 |
--- a/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource.html |
+++ b/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource.html |
@@ -1,57 +1,55 @@ |
<!DOCTYPE html> |
- |
<!-- |
See if we can load an AudioBuffer, create an AudioBufferSourceNode, attach the buffer to it, then play it. |
--> |
- |
<html> |
-<head> |
-<script src="../../resources/js-test.js"></script> |
-<script src="../resources/audit-util.js"></script> |
-<script type="text/javascript" src="../resources/buffer-loader.js"></script> |
- |
-<script> |
- |
-window.onload = init; |
- |
-var sampleRate = 44100.0; |
-var lengthInSeconds = 2; |
- |
-var context = 0; |
-var bufferLoader = 0; |
- |
-function init() { |
- if (!window.testRunner) |
- return; |
- |
- // Create offline audio context. |
- context = new OfflineAudioContext(2, sampleRate * lengthInSeconds, sampleRate); |
- |
- bufferLoader = new BufferLoader( |
- context, |
- [ |
- "../resources/hyper-reality/br-jam-loop.wav", |
- ], |
- finishedLoading |
- ); |
- |
- bufferLoader.load(); |
- testRunner.waitUntilDone(); |
-} |
- |
-function finishedLoading(bufferList) { |
- var bufferSource = context.createBufferSource(); |
- bufferSource.buffer = bufferList[0]; |
- |
- bufferSource.connect(context.destination); |
- bufferSource.start(0); |
- |
- context.oncomplete = finishAudioTest; |
- context.startRendering(); |
-} |
- |
-</script> |
-</head> |
-<body> |
-</body> |
+ <head> |
+ <title> |
+ audiobuffersource.html |
+ </title> |
+ <script src="../../resources/js-test.js"></script> |
+ <script src="../resources/audit-util.js"></script> |
+ <script src="../resources/buffer-loader.js"></script> |
+ </head> |
+ <body> |
+ <script id="layout-test-code"> |
+ window.onload = init; |
+ |
+ let sampleRate = 44100.0; |
+ let lengthInSeconds = 2; |
+ |
+ let context = 0; |
+ let bufferLoader = 0; |
+ |
+ function init() { |
+ if (!window.testRunner) |
+ return; |
+ |
+ // Create offline audio context. |
+ context = new OfflineAudioContext( |
+ 2, sampleRate * lengthInSeconds, sampleRate); |
+ |
+ bufferLoader = new BufferLoader( |
+ context, |
+ [ |
+ '../resources/hyper-reality/br-jam-loop.wav', |
+ ], |
+ finishedLoading); |
+ |
+ bufferLoader.load(); |
+ testRunner.waitUntilDone(); |
+ } |
+ |
+ function finishedLoading(bufferList) { |
+ let bufferSource = context.createBufferSource(); |
+ bufferSource.buffer = bufferList[0]; |
+ |
+ bufferSource.connect(context.destination); |
+ bufferSource.start(0); |
+ |
+ context.oncomplete = finishAudioTest; |
+ context.startRendering(); |
+ } |
+ </script> |
+ </body> |
</html> |