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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/Convolver/convolution-mono-mono.html

Issue 2669293002: Convert ConvolverNode tests to testharness (Closed)
Patch Set: Remove commented-out code 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/Convolver/convolution-mono-mono-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/webaudio/Convolver/convolution-mono-mono.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/Convolver/convolution-mono-mono.html b/third_party/WebKit/LayoutTests/webaudio/Convolver/convolution-mono-mono.html
index 337769a1b2fd301effe30b9441f2be4dd94497ee..724c6bfb14ebba1e8b4fc1c9ce789e634d784a92 100644
--- a/third_party/WebKit/LayoutTests/webaudio/Convolver/convolution-mono-mono.html
+++ b/third_party/WebKit/LayoutTests/webaudio/Convolver/convolution-mono-mono.html
@@ -2,19 +2,18 @@
<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/convolution-testing.js"></script>
</head>
<body>
-
-<div id="description"></div>
-<div id="console"></div>
-
<script>
-description("Tests ConvolverNode processing a mono channel with mono impulse response.");
+let audit = Audit.createTaskRunner();
+
+//description("Tests ConvolverNode processing a mono channel with mono impulse response.");
// To test the convolver, we convolve two square pulses together to
// produce a triangular pulse. To verify the result is correct we
@@ -26,14 +25,7 @@ description("Tests ConvolverNode processing a mono channel with mono impulse res
// the part after the pulse is sufficiently close to zero. Finally,
// the result should be exactly zero because the inputs are exactly
// zero.
-function runTest() {
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- window.jsTestIsAsync = true;
-
+audit.define("test", function (task, should) {
// Create offline audio context.
var context = new OfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate);
@@ -52,13 +44,14 @@ function runTest() {
bufferSource.start(0);
- context.oncomplete = checkConvolvedResult(trianglePulse);
- context.startRendering();
-}
-
-runTest();
-successfullyParsed = true;
-
+ context.startRendering()
+ .then(buffer => {
+ checkConvolvedResult(buffer, trianglePulse, should);
+ })
+ .then(task.done.bind(task));;
+});
+
+audit.run();
</script>
</body>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/Convolver/convolution-mono-mono-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698