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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-lengths.html

Issue 2672093002: Convert PeriodicWave Audit tests to testharness (Closed)
Patch Set: Clean up. 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-lengths-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-lengths.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-lengths.html b/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-lengths.html
index 443504b69bb6d195484778aaf3416efb448846e7..e097a1ffea29e0c40acc8cf1b54e8e5ea8ceb3f5 100644
--- a/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-lengths.html
+++ b/third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-lengths.html
@@ -2,16 +2,14 @@
<html>
<head>
<title>Test Different PeriodicWave Lengths at Different Sample Rates</title>
- <script src="../../resources/js-test.js"></script>
+ <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>
</head>
<body>
<script>
- description("Test Different PeriodicWave Lengths at Different Sample Rates");
- window.jsTestIsAsync = true;
-
// Test PeriodicWave objects with varying number of coefficients at different sample rates.
// Basically, verify that the coefficients are used at the appropriate sample rates. This is
// done by comparing the outputs of two periodic waves used in oscillators. The output should
@@ -147,10 +145,8 @@
function resultShouldBeZero(sampleRate, bigLength, smallLength) {
return function (buffer) {
var prefix = generatePrefix(sampleRate, bigLength, smallLength);
- if (isBufferZero(buffer))
- testPassed(prefix + "identical as expected.");
- else
- testFailed(prefix + "unexpectedly differ.");
+ Should(prefix + "are identical", isBufferZero(buffer))
+ .beEqualTo(true);
}
}
@@ -159,10 +155,8 @@
function resultShouldBeNonZero(sampleRate, bigLength, smallLength) {
return function (buffer) {
var prefix = generatePrefix(sampleRate, bigLength, smallLength);
- if (!isBufferZero(buffer))
- testPassed(prefix + "differ as expected.");
- else
- testFailed(prefix + "unexpectedly are identical.");
+ Should(prefix + "are different", !isBufferZero(buffer))
+ .beEqualTo(true);
}
}
@@ -247,11 +241,6 @@
audit.defineTask(actualName,
createAuditTestFunction(test.sampleRate, test.bigWave, test.smallWave, test.verifier));
}
- // Define the finish test last.
- audit.defineTask(actualTestName("finish-tests", testSet.length), function (done) {
- finishJSTest();
- done();
- });
}
defineAuditTests();
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/PeriodicWave/periodicwave-lengths-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698