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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
6 <script src="../resources/audit-util.js"></script>
7 <script src="../resources/audit.js"></script>
5 </head> 8 </head>
6 9
7 <body> 10 <body>
8 <div id="description"></div> 11 <script>
9 <div id="console"></div> 12 let audit = Audit.createTaskRunner();
10 13
11 <script> 14 audit.define({label: 'Test WaveShaperNode'}, (task, should) => {
12 description("Test WaveShaperNode");
13
14 function runTest() {
15 if (window.testRunner) {
16 testRunner.dumpAsText();
17 testRunner.waitUntilDone();
18 }
19
20 window.jsTestIsAsync = true;
21
22 // Simplified test from crbug.com/364379 15 // Simplified test from crbug.com/364379
23 var sampleRate = 44100; 16 let sampleRate = 44100;
24 var context = new OfflineAudioContext(1, sampleRate, sampleRate); 17 let context = new OfflineAudioContext(1, sampleRate, sampleRate);
25 var waveShaper = context.createWaveShaper(); 18 let waveShaper = context.createWaveShaper();
26 context.oncomplete = function () { 19 context.oncomplete = () => {
27 // If we get here, we passed the test from bug 364379. Just say we su cceeded. 20 // If we get here, we passed the test from bug 364379. Just say we
28 testPassed("WaveShaper successfully handled change in oversampling"); 21 // succeeded.
29 finishJSTest(); 22 should(true, 'WaveShaper successfully handled change in oversampling')
23 .beTrue();
24 task.done();
30 }; 25 };
31 context.startRendering(); 26 context.startRendering();
32 waveShaper.connect(context.destination); 27 waveShaper.connect(context.destination);
33 waveShaper.oversample = "4x"; 28 waveShaper.oversample = '4x';
34 } 29 });
35 30
36 runTest(); 31 audit.run();
37 successfullyParsed = true;
38 </script> 32 </script>
39 </body> 33 </body>
40 </html> 34 </html>
OLDNEW
« 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