OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <link rel="stylesheet" href="../fast/js/resources/js-test-style.css"/> | 4 <link rel="stylesheet" href="../fast/js/resources/js-test-style.css"/> |
5 <script src="resources/audio-testing.js"></script> | 5 <script src="resources/audio-testing.js"></script> |
6 <script src="../fast/js/resources/js-test-pre.js"></script> | 6 <script src="../fast/js/resources/js-test-pre.js"></script> |
7 <script src="resources/biquad-testing.js"></script> | 7 <script src="resources/biquad-testing.js"></script> |
8 </head> | 8 </head> |
9 | 9 |
10 <body> | 10 <body> |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 node = context.createWaveShaper(); | 118 node = context.createWaveShaper(); |
119 shouldThrow("node.oversample = '9x'"); | 119 shouldThrow("node.oversample = '9x'"); |
120 | 120 |
121 // Start/stop for AudioBufferSourceNodes | 121 // Start/stop for AudioBufferSourceNodes |
122 buffer = context.createBuffer(1,1, context.sampleRate); | 122 buffer = context.createBuffer(1,1, context.sampleRate); |
123 shouldNotThrow("source = context.createBufferSource()"); | 123 shouldNotThrow("source = context.createBufferSource()"); |
124 shouldNotThrow("source.buffer = buffer"); | 124 shouldNotThrow("source.buffer = buffer"); |
125 shouldNotThrow("source.start()"); | 125 shouldNotThrow("source.start()"); |
126 shouldNotThrow("source.stop()"); | 126 shouldNotThrow("source.stop()"); |
127 | 127 |
128 // It's valid to start a source that has no associated buffer. | 128 // It's not clear from the spec, but I think it's valid to call start(). The
spec is silent on |
| 129 // what happens if we call stop() afterwards, so don't call it. |
129 shouldNotThrow("source = context.createBufferSource()"); | 130 shouldNotThrow("source = context.createBufferSource()"); |
130 shouldNotThrow("source.start()"); | 131 shouldNotThrow("source.start()"); |
| 132 |
| 133 buffer = context.createBuffer(1,1, context.sampleRate); |
| 134 shouldNotThrow("source = context.createBufferSource()"); |
| 135 shouldNotThrow("source.buffer = buffer"); |
| 136 shouldThrow("source.stop()"); |
| 137 |
| 138 buffer = context.createBuffer(1,1, context.sampleRate); |
| 139 shouldNotThrow("source = context.createBufferSource()"); |
| 140 shouldNotThrow("source.buffer = buffer"); |
| 141 shouldNotThrow("source.start()"); |
| 142 shouldThrow("source.start()"); |
| 143 |
| 144 buffer = context.createBuffer(1,1, context.sampleRate); |
| 145 shouldNotThrow("source = context.createBufferSource()"); |
| 146 shouldNotThrow("source.buffer = buffer"); |
| 147 shouldNotThrow("source.start()"); |
131 shouldNotThrow("source.stop()"); | 148 shouldNotThrow("source.stop()"); |
| 149 shouldThrow("source.stop()"); |
132 | 150 |
| 151 |
133 // Start/stop for OscillatorNodes | 152 // Start/stop for OscillatorNodes |
134 shouldNotThrow("source = context.createOscillator()"); | 153 shouldNotThrow("source = context.createOscillator()"); |
135 shouldNotThrow("source.start()"); | 154 shouldNotThrow("source.start()"); |
136 shouldNotThrow("source.stop()"); | 155 shouldNotThrow("source.stop()"); |
| 156 |
| 157 shouldNotThrow("osc = context.createOscillator()"); |
| 158 shouldThrow("osc.stop()"); |
| 159 shouldNotThrow("osc1 = context.createOscillator()"); |
| 160 shouldNotThrow("osc1.start()"); |
| 161 shouldNotThrow("osc1.stop()"); |
| 162 shouldThrow("osc1.stop()"); |
| 163 |
137 } | 164 } |
138 | 165 |
139 runTest(); | 166 runTest(); |
140 successfullyParsed = true; | 167 successfullyParsed = true; |
141 | 168 |
142 </script> | 169 </script> |
143 <script src="../fast/js/resources/js-test-post.js"></script> | 170 <script src="../fast/js/resources/js-test-post.js"></script> |
144 </body> | 171 </body> |
145 </html> | 172 </html> |
OLD | NEW |