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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/resources/late-start-testing.js

Issue 2672053002: Convert Oscillator Audit tests to testharness (Closed)
Patch Set: Minor cleanups Created 3 years, 10 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/late-start-testing.js
diff --git a/third_party/WebKit/LayoutTests/webaudio/resources/late-start-testing.js b/third_party/WebKit/LayoutTests/webaudio/resources/late-start-testing.js
index 96f709b1285e757504e96ddeddc592f981fa00bf..ece2af3b9150e59716c65e38d3f9434063b54ff2 100644
--- a/third_party/WebKit/LayoutTests/webaudio/resources/late-start-testing.js
+++ b/third_party/WebKit/LayoutTests/webaudio/resources/late-start-testing.js
@@ -44,26 +44,19 @@ function runLateStartTest(audit, context, node) {
}
}
- if (nonZeroValueIndex === -1) {
- testFailed('The rendered buffer was all zeros.');
- } else if (nonZeroValueIndex === 0) {
- testFailed('The first sample was non-zero value. It should be zero.');
- } else {
- testPassed('The rendered buffer contains non-zero values after the first sample.');
- }
+ Should("The rendered buffer should not be all zeroes",
+ nonZeroValueIndex !== -1)
+ .beEqualTo(true);
+ Should("The first sample",
+ channelData[0])
+ .beEqualTo(0);
+ Should("The rendered buffer contains non-zero values after the first sample",
+ nonZeroValueIndex > 0)
+ .beEqualTo(true);
done();
});
});
- audit.defineTask('finish-test', function (done) {
- done();
- finishJSTest();
- });
-
- audit.runTasks(
- 'test-late-start',
- 'finish-test'
- );
-
-}
+ audit.runTasks();
+}

Powered by Google App Engine
This is Rietveld 408576698