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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/resources/audio-codec-test.js

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/resources/audio-codec-test.js
diff --git a/third_party/WebKit/LayoutTests/webaudio/resources/audio-codec-test.js b/third_party/WebKit/LayoutTests/webaudio/resources/audio-codec-test.js
index 9393a315db29e01d4d25cf8283f65eb7ba6c75e6..f7e046fafe52cb0a6b1cb343c6623089d766f675 100644
--- a/third_party/WebKit/LayoutTests/webaudio/resources/audio-codec-test.js
+++ b/third_party/WebKit/LayoutTests/webaudio/resources/audio-codec-test.js
@@ -4,31 +4,28 @@ var lengthInSeconds = 1;
var context = 0;
var bufferLoader = 0;
-// Run test by loading the file specified by |url|. An optional sample rate can be given to
-// select a context with a different sample rate. The default value is |defaultSampleRate|.
-function runDecodingTest(url, optionalSampleRate)
-{
- if (!window.testRunner)
- return;
+// Run test by loading the file specified by |url|. An optional sample rate can
+// be given to select a context with a different sample rate. The default value
+// is |defaultSampleRate|.
+function runDecodingTest(url, optionalSampleRate) {
+ if (!window.testRunner)
+ return;
- var sampleRate = (typeof optionalSampleRate === "undefined") ? defaultSampleRate : optionalSampleRate;
+ let sampleRate = (typeof optionalSampleRate === 'undefined') ?
+ defaultSampleRate :
+ optionalSampleRate;
- // Create offline audio context.
- context = new OfflineAudioContext(1, sampleRate * lengthInSeconds, sampleRate);
-
- bufferLoader = new BufferLoader(
- context,
- [ url ],
- finishedLoading
- );
-
- bufferLoader.load();
- testRunner.waitUntilDone();
-}
+ // Create offline audio context.
+ context =
+ new OfflineAudioContext(1, sampleRate * lengthInSeconds, sampleRate);
+
+ bufferLoader = new BufferLoader(context, [url], finishedLoading);
-function finishedLoading(bufferList)
-{
- testRunner.setAudioData(createAudioData(bufferList[0]));
- testRunner.notifyDone();
+ bufferLoader.load();
+ testRunner.waitUntilDone();
}
+function finishedLoading(bufferList) {
+ testRunner.setAudioData(createAudioData(bufferList[0]));
+ testRunner.notifyDone();
+}

Powered by Google App Engine
This is Rietveld 408576698