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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/Oscillator/oscillator-ended.html

Issue 2677723002: Convert Oscillator tests to testharness (Closed)
Patch Set: 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/Oscillator/oscillator-ended.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/Oscillator/oscillator-ended.html b/third_party/WebKit/LayoutTests/webaudio/Oscillator/oscillator-ended.html
index ba51ccb6a68ee35f8390133600125ec28565c845..72ab789dadfc1b1bdfde7900196943af2cd66198 100644
--- a/third_party/WebKit/LayoutTests/webaudio/Oscillator/oscillator-ended.html
+++ b/third_party/WebKit/LayoutTests/webaudio/Oscillator/oscillator-ended.html
@@ -1,19 +1,19 @@
<!DOCTYPE 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/audiobuffersource-testing.js"></script>
+</head>
+<body>
<script>
+ var audit = Audit.createTaskRunner();
+
var context;
var source;
- function runTest()
- {
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
+ audit.define("test", function (task, should) {
var sampleRate = 44100.0;
var lengthInSeconds = 0.1;
@@ -23,19 +23,15 @@
osc.connect(context.destination);
osc.onended = function()
{
- testPassed("osc.onended called.");
- finishJSTest();
- if (window.testRunner)
- testRunner.notifyDone();
-
+ should(true, "osc.onended was called")
+ .beTrue();
+ task.done();
}
osc.start(0);
osc.stop(0.1);
context.startRendering();
- }
+ });
+
+ audit.run();
</script>
-</head>
-<body onload="runTest()">
- <div>Tests that OscillatorNode calls its onended EventListener.</div>
- <div id="console"></div>
</body>

Powered by Google App Engine
This is Rietveld 408576698