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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-freq-data-smoothing.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-smoothing.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-freq-data-smoothing.html b/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-freq-data-smoothing.html
index 2bf47914e863684e9e9043780d33c323536b955b..ef2e4dd43c307044daf0f41d889fdc6974f5977c 100644
--- a/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-freq-data-smoothing.html
+++ b/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-freq-data-smoothing.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>
@@ -13,9 +14,6 @@
<body>
<script>
- description("Test AnalyserNode getFloatFrequencyData and getByteFrequencyData, 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;
@@ -117,18 +115,16 @@
}).then(context.resume.bind(context));
context.startRendering().then(function (buffer) {
- var prefix = "FFT smoothing performed ";
- var suffix = " with smoothing constant " + analyser.smoothingTimeConstant + ".\n"
+ var prefix = "FFT smoothing performed";
+ var suffix = " with smoothing constant " + analyser.smoothingTimeConstant;
- if (success)
- testPassed(prefix + "correctly" + suffix);
- else
- testFailed(prefix + "incorrectly" + suffix);
+ Should(prefix, success)
+ .summarize("correctly" + suffix,
+ "incorrectly" + suffix);
}).then(done);
});
audit.defineTask("finish", function (done) {
- finishJSTest();
done();
});

Powered by Google App Engine
This is Rietveld 408576698