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 maximum allowed delay of DelayNode"); | 17 label: "test", |
| 18 description: "Tests attribute and maximum allowed delay of DelayNode" |
| 19 }, function (task, should) { |
18 | 20 |
19 // Create offline audio context. | 21 // Create offline audio context. |
20 var context = new OfflineAudioContext(1, sampleRate * renderLengthSeconds, s
ampleRate); | 22 var context = new OfflineAudioContext(1, sampleRate * renderLengthSeconds, s
ampleRate); |
21 var toneBuffer = createToneBuffer(context, 20, 20 * toneLengthSeconds, sampl
eRate); // 20Hz tone | 23 var toneBuffer = createToneBuffer(context, 20, 20 * toneLengthSeconds, sampl
eRate); // 20Hz tone |
22 | 24 |
23 var bufferSource = context.createBufferSource(); | 25 var bufferSource = context.createBufferSource(); |
24 bufferSource.buffer = toneBuffer; | 26 bufferSource.buffer = toneBuffer; |
25 | 27 |
26 window.context = context; | 28 window.context = context; |
27 should(() => context.createDelay(180)) | 29 should(() => context.createDelay(180)) |
(...skipping 20 matching lines...) Expand all Loading... |
48 .then(buffer => checkDelayedResult(buffer, toneBuffer, should)) | 50 .then(buffer => checkDelayedResult(buffer, toneBuffer, should)) |
49 .then(() => task.done()); | 51 .then(() => task.done()); |
50 }); | 52 }); |
51 | 53 |
52 audit.run(); | 54 audit.run(); |
53 | 55 |
54 </script> | 56 </script> |
55 | 57 |
56 </body> | 58 </body> |
57 </html> | 59 </html> |
OLD | NEW |