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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-freq-data.html

Issue 2595633002: Convert Analyser tests to use testharness (Closed)
Patch Set: Created 4 years 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/Analyser/realtimeanalyser-freq-data.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-freq-data.html b/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-freq-data.html
index 8228406a0fb005ba02459919323adf84b5ae993d..359306d9f33ed5691697649efb4864d7383ab4b5 100644
--- a/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-freq-data.html
+++ b/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-freq-data.html
@@ -1,7 +1,8 @@
<!doctype html>
<html>
<head>
- <script src="../../resources/js-test.js"></script>
+ <script src="../../resources/testharness.js"></script>
+ <script src="../../resources/testharnessreport.js"></script>
<script src="../resources/compatibility.js"></script>
<script src="../resources/audit-util.js"></script>
<script src="../resources/audio-testing.js"></script>
@@ -12,7 +13,6 @@
<body>
<script>
- description("Test AnalyserNode getFloatFrequencyData and getByteFrequencyData, no Smoothing");
window.jsTestIsAsync = true;
hongchan 2016/12/20 23:04:31 ditto.
// Use a power of two to eliminate any round-off in the computation of the times for
@@ -82,10 +82,8 @@
// Just print a summary of the result of the above tests.
audit.defineTask("summarize basic tests", function (done) {
- if (basicTestsPassed)
- testPassed("Basic frequency data computed correctly.\n");
- else
- testFailed("Basic frequency data computed incorrectly.\n");
+ Should("Basic frequency data computed", basicTestsPassed)
+ .summarize("correctly", "incorrectly");
done();
});
@@ -132,17 +130,14 @@
freqData, expected, options);
basicTestsPassed = basicTestsPassed && comparison.success;
- if (comparison.success)
- testPassed("Smoothing constant of 0 correctly handled.\n");
- else
- testFailed("Smoothing constant of 0 incorrectly handled.\n");
+ Should("Smoothing constant of 0", comparison.success)
+ .summarize("correctly handled", "incorrectly handled");
}).then(context.resume.bind(context));
context.startRendering().then(done);
});
audit.defineTask("finish", function (done) {
- finishJSTest();
done();
});

Powered by Google App Engine
This is Rietveld 408576698