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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/IIRFilter/iirfilter-basic.html

Issue 2676853002: Convert IIRFilter tests to testharness. (Closed)
Patch Set: Add missing arg to Should() Created 3 years, 10 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/IIRFilter/iirfilter-basic.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/IIRFilter/iirfilter-basic.html b/third_party/WebKit/LayoutTests/webaudio/IIRFilter/iirfilter-basic.html
index 7d725f440642ee79f80074debd46ec81bf7a9926..f318697c52bc292c48c0ff6cbcb559a3de0f5150 100644
--- a/third_party/WebKit/LayoutTests/webaudio/IIRFilter/iirfilter-basic.html
+++ b/third_party/WebKit/LayoutTests/webaudio/IIRFilter/iirfilter-basic.html
@@ -2,16 +2,14 @@
<html>
<head>
<title>Test Basic IIRFilterNode Properties</title>
- <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>
</head>
<body>
<script>
- description("Test Basic IIRFilterNode Properties");
- window.jsTestIsAsync = true;
-
var sampleRate = 48000;
var testFrames = 100;
@@ -27,7 +25,9 @@
});
audit.defineTask("existence", function (done) {
- shouldBeDefined("context.createIIRFilter");
+ Should("context.createIIRFilter exists",
+ context.createIIRFilter != undefined)
+ .beEqualTo(true);
done();
});
@@ -44,10 +44,8 @@
success = Should("channelCountMode", f.channelCountMode).beEqualTo("max") && success;
success = Should("channelInterpretation", f.channelInterpretation).beEqualTo("speakers") && success;
- if (success)
- testPassed("All basic IIRFilter parameters are correct.\n");
- else
- testFailed("Some basic IIRFilter parameter was not correct.\n");
+ Should("Basic IRRFilter parameters", success)
+ .summarize("were all correct", "were not all correct");
done();
});
@@ -133,10 +131,9 @@
context.createIIRFilter([1, "abc", []], [1]);
}).throw("InvalidStateError") && success;
- if (success)
- testPassed("All exceptions for createIIRFilter were correctly thrown.\n");
- else
- testFailed("Some exceptions for createIIRFilter were not thrown as expected.\n");
+ Should("Exceptions for createIIRFilter", success)
+ .summarize("were all correctly thrown",
+ "were not all correctly thrown");
done();
});
@@ -191,20 +188,12 @@
30));
}).notThrow() && success;
- if (success)
- testPassed("getFrequencyResponse exceptions handled correctly.\n");
- else
- testFailed("getFrequencyResponse exceptions not handled correctly.\n");
-
- done();
- });
- audit.defineTask("finish", function (done) {
- finishJSTest();
+ Should("getFrequencyResponse exceptions handled", success)
+ .summarize("correctly", "incorrectly");
done();
});
audit.runTasks();
- successfullyParsed = true;
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698