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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/Panner/panner-equalpower-stereo.html

Issue 2713943002: Convert more PannerNode tests to testharness (Closed)
Patch Set: Address review comments 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/Panner/panner-equalpower-stereo.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/Panner/panner-equalpower-stereo.html b/third_party/WebKit/LayoutTests/webaudio/Panner/panner-equalpower-stereo.html
index 033f3e752866984f17eb1448feffa304b66463f3..aa1867576fdd0a87de95051e6d14ba93ebfdd237 100644
--- a/third_party/WebKit/LayoutTests/webaudio/Panner/panner-equalpower-stereo.html
+++ b/third_party/WebKit/LayoutTests/webaudio/Panner/panner-equalpower-stereo.html
@@ -1,18 +1,16 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<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/panner-model-testing.js"></script>
</head>
<body>
- <div id="description"></div>
- <div id="console"></div>
-
<script>
- description("Test equal-power panner model of AudioPannerNode with stereo source.");
+ let audit = Audit.createTaskRunner();
// To test the panner, we create a number of panner nodes
// equally spaced on a semicircle at unit distance. The
@@ -20,25 +18,25 @@
// covering full left to full right. Each source is an impulse
// turning at a different time and we check that the rendered
// impulse has the expected gain.
- function runTest() {
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- window.jsTestIsAsync = true;
-
- // Create offline audio context.
- context = new OfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate);
-
- createTestAndRun(context, nodesToCreate, 2, function (panner, x, y, z) {
- panner.setPosition(x, y, z);
+ audit.define(
+ {
+ label: 'test',
+ description:
+ 'Equal-power panner model of AudioPannerNode with stereo source'
+ },
+ (task, should) => {
+ context = new OfflineAudioContext(
+ 2, sampleRate * renderLengthSeconds, sampleRate);
+
+ createTestAndRun(
+ context, should, nodesToCreate, 2,
+ function(panner, x, y, z) {
+ panner.setPosition(x, y, z);
+ })
+ .then(() => task.done());
});
- }
-
- runTest();
- successfullyParsed = true;
-
+
+ audit.run();
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698