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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/note-grain-on-timing.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/AudioBufferSource/note-grain-on-timing.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/note-grain-on-timing.html b/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/note-grain-on-timing.html
index 7c87d5daf5649bf9c78823deb1f388f064a652dc..b20c173e33351ae7214fab876753c0a5e7de1a69 100644
--- a/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/note-grain-on-timing.html
+++ b/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/note-grain-on-timing.html
@@ -1,47 +1,47 @@
-<!doctype>
+<!DOCTYPE html>
<html>
<head>
+ <title>
+ note-grain-on-timing.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>
<script src="../resources/note-grain-on-testing.js"></script>
</head>
-
<body>
- <script>
+ <script id="layout-test-code">
let audit = Audit.createTaskRunner();
let squarePulseBuffer;
function checkResult(buffer, should) {
- renderedData = buffer.getChannelData(0);
- let nSamples = renderedData.length;
- let startEndFrames = findStartAndEndSamples(renderedData);
+ renderedData = buffer.getChannelData(0);
+ let nSamples = renderedData.length;
+ let startEndFrames = findStartAndEndSamples(renderedData);
- verifyStartAndEndFrames(startEndFrames, should);
+ verifyStartAndEndFrames(startEndFrames, should);
}
- audit.define("Test timing of noteGrainOn", function (task, should) {
- // Create offline audio context.
- context = new OfflineAudioContext(2, sampleRate * renderTime,
- sampleRate);
+ audit.define('Test timing of noteGrainOn', function(task, should) {
+ // Create offline audio context.
+ context =
+ new OfflineAudioContext(2, sampleRate * renderTime, sampleRate);
- squarePulseBuffer = createSignalBuffer(context, function (k) {
- return 1
- });
+ squarePulseBuffer = createSignalBuffer(context, function(k) {
+ return 1
+ });
- playAllGrains(context, squarePulseBuffer, numberOfTests);
+ playAllGrains(context, squarePulseBuffer, numberOfTests);
- context.startRendering()
- .then(function (audioBuffer) {
- checkResult(audioBuffer, should);
- task.done();
- });
+ context.startRendering().then(function(audioBuffer) {
+ checkResult(audioBuffer, should);
+ task.done();
+ });
});
-
+
audit.run();
</script>
-
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698