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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/BiquadFilter/biquad-highshelf.html

Issue 2667153002: Convert BiquadFilter response tests to testharness (Closed)
Patch Set: Address review comments Created 3 years, 11 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/BiquadFilter/biquad-highshelf.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/BiquadFilter/biquad-highshelf.html b/third_party/WebKit/LayoutTests/webaudio/BiquadFilter/biquad-highshelf.html
index 10002c7b938a3cde9d5cd1f84cff28633451de49..7480684fad17769180e542f064ac932a132d995e 100644
--- a/third_party/WebKit/LayoutTests/webaudio/BiquadFilter/biquad-highshelf.html
+++ b/third_party/WebKit/LayoutTests/webaudio/BiquadFilter/biquad-highshelf.html
@@ -2,47 +2,38 @@
<html>
<head>
-<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>
+<script src="../resources/audit.js"></script>
<script src="../resources/biquad-filters.js"></script>
<script src="../resources/biquad-testing.js"></script>
</head>
<body>
+<script>
+let audit = Audit.createTaskRunner();
-<div id="description"></div>
-<div id="console"></div>
+audit.define("test", function (task, should) {
+ task.describe("Biquad highshelf filter");
-<script>
-description("Tests Biquad highshelf filter.");
-
-function runTest() {
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- window.jsTestIsAsync = true;
-
// Create offline audio context.
- var context = new OfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate);
+ let context = new OfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate);
// The filters we want to test.
- var filterParameters = [{cutoff : 0, q : 10, gain : 10 },
+ let filterParameters = [{cutoff : 0, q : 10, gain : 10 },
{cutoff : 1, q : 10, gain : 10 },
{cutoff : 0.25, q : 10, gain : 10 },
];
createTestAndRun(context, "highshelf", {
+ should: should,
threshold: 5.6633e-8,
filterParameters: filterParameters
- });
-}
-
-runTest();
-successfullyParsed = true;
+ }).then(task.done.bind(task));
+});
+audit.run();
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698