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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-large-endtime.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/AudioParam/audioparam-large-endtime.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-large-endtime.html b/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-large-endtime.html
index 0c9753c5c9328d2a86c1f81e246c6896ed3d78d6..2c1d186398d164796d1799a19f33cedb89ed2907 100644
--- a/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-large-endtime.html
+++ b/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-large-endtime.html
@@ -1,72 +1,73 @@
-<!doctype html>
+<!DOCTYPE html>
<html>
<head>
+ <title>
+ AudioParam with Huge End Time
+ </title>
<script src="../../resources/testharness.js"></script>
- <script src="../../resources/testharnessreport.js"></script>
+ <script src="../../resources/testharnessreport.js"></script>
<script src="../resources/audit-util.js"></script>
<script src="../resources/audit.js"></script>
- <title>AudioParam with Huge End Time</title>
</head>
-
<body>
- <script>
- var sampleRate = 48000;
+ <script id="layout-test-code">
+ let sampleRate = 48000;
// Render for some small (but fairly arbitrary) time.
- var renderDuration = 0.125;
- // Any huge time value that won't fit in a size_t (2^64 on a 64-bit machine).
- var largeTime = 1e300;
+ let renderDuration = 0.125;
+ // Any huge time value that won't fit in a size_t (2^64 on a 64-bit
+ // machine).
+ let largeTime = 1e300;
- var audit = Audit.createTaskRunner();
+ let audit = Audit.createTaskRunner();
- // See crbug.com/582701. Create an audioparam with a huge end time and verify that to
- // automation is run. We don't care about the actual results, just that it runs.
+ // See crbug.com/582701. Create an audioparam with a huge end time and
+ // verify that to automation is run. We don't care about the actual
+ // results, just that it runs.
// Test linear ramp with huge end time
- audit.define("linearRamp", (task, should) => {
- var graph = createGraph();
+ audit.define('linearRamp', (task, should) => {
+ let graph = createGraph();
graph.gain.gain.linearRampToValueAtTime(0.1, largeTime);
graph.source.start();
- graph.context.startRendering().then(function (buffer) {
- should(true, "linearRampToValue(0.1, " + largeTime + ")")
- .message("successfully rendered",
- "unsuccessfully rendered");
- }).then(() => task.done());
+ graph.context.startRendering()
+ .then(function(buffer) {
+ should(true, 'linearRampToValue(0.1, ' + largeTime + ')')
+ .message('successfully rendered', 'unsuccessfully rendered');
+ })
+ .then(() => task.done());
});
// Test exponential ramp with huge end time
- audit.define("exponentialRamp", (task, should) => {
- var graph = createGraph();
+ audit.define('exponentialRamp', (task, should) => {
+ let graph = createGraph();
graph.gain.gain.exponentialRampToValueAtTime(.1, largeTime);
graph.source.start();
- graph.context.startRendering().then(function (buffer) {
- should(true, "exponentialRampToValue(0.1, " + largeTime + ")")
- .message("successfully rendered",
- "unsuccessfully rendered");
- }).then(() => task.done());
+ graph.context.startRendering()
+ .then(function(buffer) {
+ should(true, 'exponentialRampToValue(0.1, ' + largeTime + ')')
+ .message('successfully rendered', 'unsuccessfully rendered');
+ })
+ .then(() => task.done());
});
audit.run();
// Create the graph and return the context, the source, and the gain node.
function createGraph() {
- var context = new OfflineAudioContext(1, renderDuration * sampleRate, sampleRate);
- var src = context.createBufferSource();
+ let context =
+ new OfflineAudioContext(1, renderDuration * sampleRate, sampleRate);
+ let src = context.createBufferSource();
src.buffer = createConstantBuffer(context, 1, 1);
src.loop = true;
- var gain = context.createGain();
+ let gain = context.createGain();
src.connect(gain);
gain.connect(context.destination);
gain.gain.setValueAtTime(1, 0.1 / sampleRate);
- return {
- context: context,
- gain: gain,
- source: src
- };
+ return {context: context, gain: gain, source: src};
}
-
- </script>
+ </script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698