Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-detached-no-crash.html

Issue 2895963003: Apply layout-test-tidy to LayoutTests/webaudio (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-detached-no-crash.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-detached-no-crash.html b/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-detached-no-crash.html
index a1a8db0520057a687a3990859f209947c1b74d84..7f0738653591215d159597aa1eb1679fd8be1ae6 100644
--- a/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-detached-no-crash.html
+++ b/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-detached-no-crash.html
@@ -1,67 +1,70 @@
-<!DOCTYPE HTML>
+<!DOCTYPE html>
<html>
-<head>
-<script src="../../resources/js-test.js"></script>
-<script src="../resources/audit-util.js"></script>
-</head>
-<body>
-<script>
-description("Tests document-detached use of OfflineAudioContext, pass if no crash.");
+ <head>
+ <title>
+ offlineaudiocontext-detached-no-crash.html
+ </title>
+ <script src="../../resources/js-test.js"></script>
+ <script src="../resources/audit-util.js"></script>
+ </head>
+ <body>
+ <script id="layout-test-code">
+ description(
+ 'Tests document-detached use of OfflineAudioContext, pass if no crash.');
-window.jsTestIsAsync = true;
+ window.jsTestIsAsync = true;
-function errorCallback(error)
-{
- testPassed("OfflineAudioContext.startRendering() on a closed context threw an exception.");
- finishJSTest();
-}
+ function errorCallback(error) {
+ testPassed(
+ 'OfflineAudioContext.startRendering() on a closed context threw an exception.');
+ finishJSTest();
+ }
-function successCallback()
-{
- testFailed("OfflineAudioContext.startRendering() on a closed context did not throw an exception.");
- finishJSTest();
-}
+ function successCallback() {
+ testFailed(
+ 'OfflineAudioContext.startRendering() on a closed context did not throw an exception.');
+ finishJSTest();
+ }
-var context;
-function runTest()
-{
- context.startRendering().then(successCallback, errorCallback);
-}
+ let context;
+ function runTest() {
+ context.startRendering().then(successCallback, errorCallback);
+ }
-function createOfflineContext()
-{
- var sampleRate = 44100.0;
- var renderLengthInFrames = 512;
- var bufferSize = 512;
+ function createOfflineContext() {
+ let sampleRate = 44100.0;
+ let renderLengthInFrames = 512;
+ let bufferSize = 512;
- context = new w.OfflineAudioContext(1, renderLengthInFrames, sampleRate);
- var node = context.createScriptProcessor(bufferSize, 0, 1);
- var source = context.createBufferSource();
- source.buffer = createImpulseBuffer(context, bufferSize);
- node.onaudioprocess = function(e) { };
- source.connect(node);
- node.connect(context.destination);
- source.start(0);
-}
+ context =
+ new w.OfflineAudioContext(1, renderLengthInFrames, sampleRate);
+ let node = context.createScriptProcessor(bufferSize, 0, 1);
+ let source = context.createBufferSource();
+ source.buffer = createImpulseBuffer(context, bufferSize);
+ node.onaudioprocess = function(e) {};
+ source.connect(node);
+ node.connect(context.destination);
+ source.start(0);
+ }
-var w;
-function processMessage(event) {
- if (event.data == "opened") {
- createOfflineContext();
- w.close();
- } else if (event.data == "closed") {
- setTimeout(runTest, 100);
- }
-}
+ let w;
+ function processMessage(event) {
+ if (event.data == 'opened') {
+ createOfflineContext();
+ w.close();
+ } else if (event.data == 'closed') {
+ setTimeout(runTest, 100);
+ }
+ }
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- testRunner.setCanOpenWindows();
-}
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ testRunner.setCanOpenWindows();
+ }
-w = window.open('../../resources/window-postmessage-open-close.html');
-window.addEventListener("message", processMessage, false);
-</script>
-</body>
+ w = window.open('../../resources/window-postmessage-open-close.html');
+ window.addEventListener('message', processMessage, false);
+ </script>
+ </body>
</html>

Powered by Google App Engine
This is Rietveld 408576698