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-zero.html

Issue 2777983002: Convert Analyser tests to use new Audit. (Closed)
Patch Set: Remove console.logs Created 3 years, 9 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/Analyser/realtimeanalyser-zero.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-zero.html b/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-zero.html
index c13a11e12321e657a0d32e465920ffcf0e16694a..0c780a9292bf14fc5c488c20b7caa8dd87b376de 100644
--- a/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-zero.html
+++ b/third_party/WebKit/LayoutTests/webaudio/Analyser/realtimeanalyser-zero.html
@@ -4,7 +4,7 @@
<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>
+ <script src="../resources/audit.js"></script>
<title>Test getFloatFrequencyData With Zero Inputs</title>
</head>
@@ -20,7 +20,7 @@
// Test that getFloatFrequencyData returns -Infinity when the input is all-zeroes.
- audit.defineTask("zero input", function (done) {
+ audit.define("zero input", (task, should) => {
var context = new OfflineAudioContext(1, renderFrames, sampleRate);
// Constant source of 0's.
@@ -42,18 +42,14 @@
var f = new Float32Array(analyser.frequencyBinCount);
analyser.getFloatFrequencyData(f);
- Should("getFloatFrequencyData() with zero-valued input", f)
+ should(f, "getFloatFrequencyData() with zero-valued input")
.beConstantValueOf(-Infinity);
}).then(context.resume.bind(context));
- context.startRendering().then(done);
+ context.startRendering().then(() => task.done());
});
- audit.defineTask("finish", function (done) {
- done();
- });
-
- audit.runTasks();
+ audit.run();
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698