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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/resources/late-start-testing.js

Issue 2672053002: Convert Oscillator Audit 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 | « third_party/WebKit/LayoutTests/webaudio/Oscillator/oscillator-late-start-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function runLateStartTest(audit, context, node) { 1 function runLateStartTest(audit, context, node) {
2 2
3 // Set up a dummy signal path to keep the audio context running and spend 3 // Set up a dummy signal path to keep the audio context running and spend
4 // processing time before calling start(0). 4 // processing time before calling start(0).
5 var osc = context.createOscillator(); 5 var osc = context.createOscillator();
6 var silent = context.createGain(); 6 var silent = context.createGain();
7 7
8 osc.connect(silent); 8 osc.connect(silent);
9 silent.connect(context.destination); 9 silent.connect(context.destination);
10 silent.gain.setValueAtTime(0.0, 0); 10 silent.gain.setValueAtTime(0.0, 0);
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 37
38 var success = 38 var success =
39 Should('The index of first non-zero value',nonZeroValueIndex) 39 Should('The index of first non-zero value',nonZeroValueIndex)
40 .notBeEqualTo(-1); 40 .notBeEqualTo(-1);
41 success = Should('The first sample value', channelData[0]) 41 success = Should('The first sample value', channelData[0])
42 .beEqualTo(0) && success; 42 .beEqualTo(0) && success;
43 Should('The rendered buffer', success) 43 Should('The rendered buffer', success)
44 .summarize('contains non-zero values after the first sample', 44 .summarize('contains non-zero values after the first sample',
45 'was all zeros or has non-zero first sample.'); 45 'was all zeros or has non-zero first sample.');
46
47 done(); 46 done();
48 }); 47 });
49 }); 48 });
50 49
51 audit.defineTask('finish-test', function (done) { 50 audit.runTasks();
52 done();
53 finishJSTest();
54 });
55
56 audit.runTasks(
57 'test-late-start',
58 'finish-test'
59 );
60
61 } 51 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/webaudio/Oscillator/oscillator-late-start-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698