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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-late-start.html

Issue 2783553002: Convert AudioBufferSource tests to new Audit (Closed)
Patch Set: Indent neatly. Created 3 years, 8 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/audiobuffersource-late-start.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-late-start.html b/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-late-start.html
index 803e98d6f2868a28639ad393dfcb1f962f5b863b..8c0cc40893e3d57c27b965adbed6e204114fe290 100644
--- a/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-late-start.html
+++ b/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-late-start.html
@@ -5,7 +5,7 @@
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../resources/audit-util.js"></script>
- <script src="../resources/audio-testing.js"></script>
+ <script src="../resources/audit.js"></script>
</head>
<body>
@@ -33,7 +33,7 @@
});
}
- audit.defineTask('test-late-start', function (done) {
+ audit.define('test-late-start', (task, should) => {
var context = new OfflineAudioContext(1, renderDuration * sampleRate, sampleRate);
var dcOffsetbuffer = createConstantBuffer(context, 1, 1.0);
var source = context.createBufferSource();
@@ -64,23 +64,17 @@
var startIndex = getStartIndex(startTime);
var nonZeroValueIndex = getValueChangeIndex(channelData, 1.0);
- Should('The output', channelData).containValues([0, 1]);
- Should('The index of value change', nonZeroValueIndex)
+ should(channelData, 'The output').containValues([0, 1]);
+ should(nonZeroValueIndex, 'The index of value change')
.beEqualTo(startIndex);
- Should('The index of the first non-zero sample', nonZeroValueIndex)
+ should(nonZeroValueIndex, 'The index of the first non-zero sample')
.notBeEqualTo(0)
- }).then(done);
+ }).then(() => task.done());
});
- audit.defineTask('finish-test', function (done) {
- done();
- });
-
- audit.runTasks();
-
- successfullyParsed = true;
+ audit.run();
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698