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 </head> | 9 </head> |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 .notThrow(); | 61 .notThrow(); |
62 | 62 |
63 // Create a new context and try to connect the other context's node to this | 63 // Create a new context and try to connect the other context's node to this |
64 // one. | 64 // one. |
65 context2 = new AudioContext(); | 65 context2 = new AudioContext(); |
66 should( | 66 should( |
67 () => window.audioNode.connect(context2.destination), | 67 () => window.audioNode.connect(context2.destination), |
68 'Connecting a node to a different context') | 68 'Connecting a node to a different context') |
69 .throw('InvalidAccessError'); | 69 .throw('InvalidAccessError'); |
70 | 70 |
| 71 // 3-arg AudioContext doesn't create an offline context anymore. |
71 should( | 72 should( |
72 () => context3 = new AudioContext(1, 44100, 44100), | 73 () => context3 = new AudioContext(1, 44100, 44100), |
73 'context3 = new AudioContext(1, 44100, 44100)') | 74 'context3 = new AudioContext(1, 44100, 44100)') |
74 .notThrow(); | 75 .throw('TypeError'); |
75 should( | |
76 context3 instanceof OfflineAudioContext, | |
77 'context3 instanceof OfflineAudioContext') | |
78 .beFalse(); | |
79 | 76 |
80 // Ensure it is an EventTarget | 77 // Ensure it is an EventTarget |
81 should(audioNode instanceof EventTarget, 'AudioNode is an EventTarget') | 78 should(audioNode instanceof EventTarget, 'AudioNode is an EventTarget') |
82 .beTrue(); | 79 .beTrue(); |
83 | 80 |
84 task.done(); | 81 task.done(); |
85 }); | 82 }); |
86 | 83 |
87 audit.run(); | 84 audit.run(); |
88 | |
89 </script> | 85 </script> |
90 | 86 |
91 </body> | 87 </body> |
92 </html> | 88 </html> |
OLD | NEW |