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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/AudioNode/audionode-connect-order.html

Issue 2708953003: Move task.describe descriptions to audit.define (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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="../resources/audit-util.js"></script> 7 <script src="../resources/audit-util.js"></script>
8 <script src="../resources/audit.js"></script> 8 <script src="../resources/audit.js"></script>
9 </head> 9 </head>
10 10
(...skipping 11 matching lines...) Expand all
22 let n = audioBuffer.length; 22 let n = audioBuffer.length;
23 let data = audioBuffer.getChannelData(0); 23 let data = audioBuffer.getChannelData(0);
24 24
25 for (let i = 0; i < n; ++i) { 25 for (let i = 0; i < n; ++i) {
26 data[i] = Math.sin(frequency * 2 * Math.PI * i / sampleRate); 26 data[i] = Math.sin(frequency * 2 * Math.PI * i / sampleRate);
27 } 27 }
28 28
29 return audioBuffer; 29 return audioBuffer;
30 } 30 }
31 31
32 audit.define('Test connections', function(task, should) { 32 audit.define({
33 task.describe('AudioNode connection order doesn\'t trigger assertion errors'); 33 label: 'Test connections',
34 description: 'AudioNode connection order doesn\'t trigger assertion errors'
35 }, function(task, should) {
34 // Create offline audio context. 36 // Create offline audio context.
35 let context = 37 let context =
36 new OfflineAudioContext(1, sampleRate * renderLengthSeconds, sampleRate); 38 new OfflineAudioContext(1, sampleRate * renderLengthSeconds, sampleRate);
37 let toneBuffer = createSinWaveBuffer(context, renderLengthSeconds, 880); 39 let toneBuffer = createSinWaveBuffer(context, renderLengthSeconds, 880);
38 40
39 let bufferSource = context.createBufferSource(); 41 let bufferSource = context.createBufferSource();
40 bufferSource.buffer = toneBuffer; 42 bufferSource.buffer = toneBuffer;
41 bufferSource.connect(context.destination); 43 bufferSource.connect(context.destination);
42 44
43 let delay = context.createDelay(); 45 let delay = context.createDelay();
(...skipping 19 matching lines...) Expand all
63 .beResolved() 65 .beResolved()
64 .then(task.done.bind(task)); 66 .then(task.done.bind(task));
65 }); 67 });
66 68
67 audit.run(); 69 audit.run();
68 70
69 </script> 71 </script>
70 72
71 </body> 73 </body>
72 </html> 74 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698