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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/WaveShaper/waveshaper-364379.html

Issue 2714223002: Convert more WaveShaper 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/WaveShaper/waveshaper-364379-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/WaveShaper/waveshaper-364379.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/WaveShaper/waveshaper-364379.html b/third_party/WebKit/LayoutTests/webaudio/WaveShaper/waveshaper-364379.html
index 7e7dad6f8aae57cdcbf59d589f1c4a2322eef0d7..aebbcc2364d0400bf3d20035a4cdcc0c4435d82e 100644
--- a/third_party/WebKit/LayoutTests/webaudio/WaveShaper/waveshaper-364379.html
+++ b/third_party/WebKit/LayoutTests/webaudio/WaveShaper/waveshaper-364379.html
@@ -1,40 +1,34 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!doctype html>
<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/audit.js"></script>
</head>
<body>
- <div id="description"></div>
- <div id="console"></div>
-
<script>
- description("Test WaveShaperNode");
-
- function runTest() {
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- window.jsTestIsAsync = true;
+ let audit = Audit.createTaskRunner();
+ audit.define({label: 'Test WaveShaperNode'}, (task, should) => {
// Simplified test from crbug.com/364379
- var sampleRate = 44100;
- var context = new OfflineAudioContext(1, sampleRate, sampleRate);
- var waveShaper = context.createWaveShaper();
- context.oncomplete = function () {
- // If we get here, we passed the test from bug 364379. Just say we succeeded.
- testPassed("WaveShaper successfully handled change in oversampling");
- finishJSTest();
+ let sampleRate = 44100;
+ let context = new OfflineAudioContext(1, sampleRate, sampleRate);
+ let waveShaper = context.createWaveShaper();
+ context.oncomplete = () => {
+ // If we get here, we passed the test from bug 364379. Just say we
+ // succeeded.
+ should(true, 'WaveShaper successfully handled change in oversampling')
+ .beTrue();
+ task.done();
};
context.startRendering();
waveShaper.connect(context.destination);
- waveShaper.oversample = "4x";
- }
+ waveShaper.oversample = '4x';
+ });
- runTest();
- successfullyParsed = true;
+ audit.run();
</script>
</body>
</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/WaveShaper/waveshaper-364379-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698