OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Checking window.audioWorklet</title> | 4 <title> |
5 <script src="../../resources/testharness.js"></script> | 5 Checking window.audioWorklet |
6 <script src="../../resources/testharnessreport.js"></script> | 6 </title> |
7 <script src="../resources/audit.js"></script> | 7 <script src="../../resources/testharness.js"></script> |
8 <script src="audioworklet-testing.js"></script> | 8 <script src="../../resources/testharnessreport.js"></script> |
9 </head> | 9 <script src="../resources/audit.js"></script> |
10 <body> | 10 <script src="audioworklet-testing.js"></script> |
11 <script> | 11 </head> |
12 // This test requires AudioWorklet. | 12 <body> |
13 let audioWorkletStatus = isAudioWorkletEnabled(); | 13 <script id="layout-test-code"> |
| 14 // This test requires AudioWorklet. |
| 15 let audioWorkletStatus = isAudioWorkletEnabled(); |
14 | 16 |
15 let audit = Audit.createTaskRunner(); | 17 let audit = Audit.createTaskRunner(); |
16 | 18 |
17 // Test if AudioWorklet exists. | 19 // Test if AudioWorklet exists. |
18 audit.define({ | 20 audit.define( |
19 label: 'window-audioworklet', | 21 { |
20 description: 'Test if AudioWorklet exists.', | 22 label: 'window-audioworklet', |
21 }, (task, should) => { | 23 description: 'Test if AudioWorklet exists.', |
22 // TODO(hongchan): remove this assertion when AudioWorklet is shipped. | 24 }, |
23 should(audioWorkletStatus.onContentShell || | 25 (task, should) => { |
24 audioWorkletStatus.onBrowser, | 26 // TODO(hongchan): remove this assertion when AudioWorklet is |
25 'AudioWorklet is available on ContentShell or Browser') | 27 // shipped. |
26 .beTrue(); | 28 should( |
| 29 audioWorkletStatus.onContentShell || |
| 30 audioWorkletStatus.onBrowser, |
| 31 'AudioWorklet is available on ContentShell or Browser') |
| 32 .beTrue(); |
27 | 33 |
28 should(window.audioWorklet instanceof Worklet, | 34 should( |
29 'window.audioWorklet is an instance of Worklet') | 35 window.audioWorklet instanceof Worklet, |
30 .beTrue(); | 36 'window.audioWorklet is an instance of Worklet') |
| 37 .beTrue(); |
31 | 38 |
32 task.done(); | 39 task.done(); |
33 }); | 40 }); |
34 | 41 |
35 audit.run(); | 42 audit.run(); |
36 </script> | 43 </script> |
37 </body> | 44 </body> |
38 </html> | 45 </html> |
OLD | NEW |