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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/ScriptProcessor/scriptprocessornode-zero-input-channels.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/ScriptProcessor/scriptprocessornode-zero-input-channels.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/ScriptProcessor/scriptprocessornode-zero-input-channels.html b/third_party/WebKit/LayoutTests/webaudio/ScriptProcessor/scriptprocessornode-zero-input-channels.html
index c1af136fb0054466524b56629ae3ab0b07b498a3..dd95bc589a0278fed3407fcb08d8d93d7ca7f9c8 100644
--- a/third_party/WebKit/LayoutTests/webaudio/ScriptProcessor/scriptprocessornode-zero-input-channels.html
+++ b/third_party/WebKit/LayoutTests/webaudio/ScriptProcessor/scriptprocessornode-zero-input-channels.html
@@ -1,57 +1,64 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE html>
<html>
-<head>
-<script src="../../resources/testharness.js"></script>
-<script src="../../resources/testharnessreport.js"></script>
-<script src="../resources/audit-util.js"></script>
-<script src="../resources/audit.js"></script>
-</head>
-
-<body>
-<script>
-let audit = Audit.createTaskRunner();
-
-let sampleRate = 44100.0;
-let renderLengthInFrames = 512;
-let bufferSize = 512;
-
-audit.define(
- {
- label: 'test',
- description: 'Tests that ScriptProcessorNode accepts 0 input channels'
- },
- (task, should) => {
- let context =
- new OfflineAudioContext(1, renderLengthInFrames, sampleRate);
-
- let node;
-
- should(() => {
- node = context.createScriptProcessor(bufferSize, 0, 1);
- }, 'node = context.createScriptProcessor(bufferSize, 0, 1)').notThrow();
- let source = context.createBufferSource();
- source.buffer = createImpulseBuffer(context, bufferSize);
-
- // The onaudioprocess function doesn't need to do anything. We just need
- // the process to start to test that implementation accepts 0 input
- // channels.
- //
- // FIXME: check the .inputBuffer attribute of the AudioProcessingEvent.
- node.onaudioprocess = function(e) {};
- source.connect(node);
- node.connect(context.destination);
- source.start(0);
-
- context.oncomplete = event => {
- should(true, 'ScriptProcessorNode accepts 0 input channels').beTrue();
- task.done();
- };
-
- context.startRendering();
- });
-
-audit.run();
-</script>
-
-</body>
+ <head>
+ <title>
+ scriptprocessornode-zero-input-channels.html
+ </title>
+ <script src="../../resources/testharness.js"></script>
+ <script src="../../resources/testharnessreport.js"></script>
+ <script src="../resources/audit-util.js"></script>
+ <script src="../resources/audit.js"></script>
+ </head>
+ <body>
+ <script id="layout-test-code">
+ let audit = Audit.createTaskRunner();
+
+ let sampleRate = 44100.0;
+ let renderLengthInFrames = 512;
+ let bufferSize = 512;
+
+ audit.define(
+ {
+ label: 'test',
+ description:
+ 'Tests that ScriptProcessorNode accepts 0 input channels'
+ },
+ (task, should) => {
+ let context =
+ new OfflineAudioContext(1, renderLengthInFrames, sampleRate);
+
+ let node;
+
+ should(
+ () => {
+ node = context.createScriptProcessor(bufferSize, 0, 1);
+ },
+ 'node = context.createScriptProcessor(bufferSize, 0, 1)')
+ .notThrow();
+ let source = context.createBufferSource();
+ source.buffer = createImpulseBuffer(context, bufferSize);
+
+ // The onaudioprocess function doesn't need to do anything. We just
+ // need the process to start to test that implementation accepts 0
+ // input channels.
+ //
+ // FIXME: check the .inputBuffer attribute of the
+ // AudioProcessingEvent.
+ node.onaudioprocess = function(e) {};
+ source.connect(node);
+ node.connect(context.destination);
+ source.start(0);
+
+ context.oncomplete = event => {
+ should(true, 'ScriptProcessorNode accepts 0 input channels')
+ .beTrue();
+ task.done();
+ };
+
+ context.startRendering();
+ });
+
+ audit.run();
+ </script>
+ </body>
</html>

Powered by Google App Engine
This is Rietveld 408576698