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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-promise-basic.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-promise-basic.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-promise-basic.html b/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-promise-basic.html
index 6f79e26c175cd1bc9fa9bbe729141fd3f1c7e36d..48aebc41c9d713aa154a066b710bd9e3edc0d185 100644
--- a/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-promise-basic.html
+++ b/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-promise-basic.html
@@ -1,28 +1,29 @@
-<!doctype html>
+<!DOCTYPE html>
<html>
<head>
+ <title>
+ OfflineAudioContext.startRendering Promise
+ </title>
<script src="../../resources/testharness.js"></script>
- <script src="../../resources/testharnessreport.js"></script>
+ <script src="../../resources/testharnessreport.js"></script>
<script src="../resources/audit.js"></script>
- <title>OfflineAudioContext.startRendering Promise</title>
</head>
-
<body>
- <script>
- var context;
- var promiseData;
+ <script id="layout-test-code">
+ let context;
+ let promiseData;
- var sampleRate = 48000;
- var renderSeconds = 1;
- var renderFrames = sampleRate * renderSeconds;
- var contextChannels = 2;
+ let sampleRate = 48000;
+ let renderSeconds = 1;
+ let renderFrames = sampleRate * renderSeconds;
+ let contextChannels = 2;
- var audit = Audit.createTaskRunner();
+ let audit = Audit.createTaskRunner();
audit.define('reject-promise', (task, should) => {
// Create a context and verify that calling startRendering more than
// once causes a rejected promise.
- var context =
+ let context =
new OfflineAudioContext(contextChannels, renderFrames, sampleRate);
context.startRendering();
should(
@@ -38,14 +39,14 @@
context =
new OfflineAudioContext(contextChannels, renderFrames, sampleRate);
- var buffer =
+ let buffer =
context.createBuffer(contextChannels, renderFrames, sampleRate);
- for (var k = 0; k < renderFrames; ++k) {
+ for (let k = 0; k < renderFrames; ++k) {
buffer.getChannelData(0)[k] = 1;
buffer.getChannelData(1)[k] = 2;
}
- var source = context.createBufferSource();
+ let source = context.createBufferSource();
source.buffer = buffer;
source.connect(context.destination);
source.start();
@@ -74,6 +75,5 @@
}
}
</script>
-
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698