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

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

Issue 2595633002: Convert Analyser tests to use testharness (Closed)
Patch Set: Remove blank line 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..cb9e3bea438f1922c5030470707fa675de387e5d 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,9 +13,6 @@
<body>
<script>
- description("Test AnalyserNode getFloatFrequencyData and getByteFrequencyData, no Smoothing");
- window.jsTestIsAsync = true;
-
// Use a power of two to eliminate any round-off in the computation of the times for
// context.suspend().
var sampleRate = 32768;
@@ -82,10 +80,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 +128,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