OLD | NEW |
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 <script src="../resources/delay-testing.js"></script> | 9 <script src="../resources/delay-testing.js"></script> |
10 </head> | 10 </head> |
11 | 11 |
12 <body> | 12 <body> |
13 <script> | 13 <script> |
14 let audit = Audit.createTaskRunner(); | 14 let audit = Audit.createTaskRunner(); |
15 | 15 |
16 audit.define("test", function (task, should) { | 16 audit.define({ |
17 task.describe("Tests attribute and basic functionality of DelayNode"); | 17 label: "test", |
| 18 description: "Tests attribute and basic functionality of DelayNode" |
| 19 }, function (task, should) { |
18 | 20 |
19 // Create offline audio context. | 21 // Create offline audio context. |
20 let context = new OfflineAudioContext(1, sampleRate * renderLengthSeconds, s
ampleRate); | 22 let context = new OfflineAudioContext(1, sampleRate * renderLengthSeconds, s
ampleRate); |
21 let toneBuffer = createToneBuffer(context, 20, 20 * toneLengthSeconds, sampl
eRate); // 20Hz tone | 23 let toneBuffer = createToneBuffer(context, 20, 20 * toneLengthSeconds, sampl
eRate); // 20Hz tone |
22 | 24 |
23 let bufferSource = context.createBufferSource(); | 25 let bufferSource = context.createBufferSource(); |
24 bufferSource.buffer = toneBuffer; | 26 bufferSource.buffer = toneBuffer; |
25 | 27 |
26 let delay = context.createDelay(); | 28 let delay = context.createDelay(); |
27 | 29 |
(...skipping 19 matching lines...) Expand all Loading... |
47 .then(buffer => checkDelayedResult(buffer, toneBuffer, should)) | 49 .then(buffer => checkDelayedResult(buffer, toneBuffer, should)) |
48 .then(task.done.bind(task)); | 50 .then(task.done.bind(task)); |
49 }); | 51 }); |
50 | 52 |
51 audit.run(); | 53 audit.run(); |
52 | 54 |
53 </script> | 55 </script> |
54 | 56 |
55 </body> | 57 </body> |
56 </html> | 58 </html> |
OLD | NEW |