| 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 | 2 |
| 3 <!-- | 3 <!-- |
| 4 Create an oscillator of each type and verify that the type is set correctly. | 4 Create an oscillator of each type and verify that the type is set correctly. |
| 5 --> | 5 --> |
| 6 <html> | 6 <html> |
| 7 <head> | 7 <head> |
| 8 <script src="../../resources/testharness.js"></script> | 8 <script src="../../resources/testharness.js"></script> |
| 9 <script src="../../resources/testharnessreport.js"></script> | 9 <script src="../../resources/testharnessreport.js"></script> |
| 10 <script src="../resources/audit-util.js"></script> | 10 <script src="../resources/audit-util.js"></script> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 }).throw('InvalidStateError'); | 39 }).throw('InvalidStateError'); |
| 40 | 40 |
| 41 // Now set a custom oscillator | 41 // Now set a custom oscillator |
| 42 var coeffA = new Float32Array([0, 1, 0.5]); | 42 var coeffA = new Float32Array([0, 1, 0.5]); |
| 43 var coeffB = new Float32Array([0, 0, 0]); | 43 var coeffB = new Float32Array([0, 0, 0]); |
| 44 var wave = context.createPeriodicWave(coeffA, coeffB); | 44 var wave = context.createPeriodicWave(coeffA, coeffB); |
| 45 | 45 |
| 46 Should("osc.setPeriodicWave(wave)", function () { | 46 Should("osc.setPeriodicWave(wave)", function () { |
| 47 osc.setPeriodicWave(wave); | 47 osc.setPeriodicWave(wave); |
| 48 }).notThrow(); | 48 }).notThrow(); |
| 49 Should("osc.type", osc.type).beEqualTo("custom"); | 49 Should("After setting periodicWave, osc.type", osc.type).beEqualTo("custom")
; |
| 50 | 50 |
| 51 // Check that numerical values are no longer supported | 51 // Check that numerical values are no longer supported |
| 52 var oldType = osc.type; | 52 var oldType = osc.type; |
| 53 osc.type = 0; | 53 osc.type = 0; |
| 54 Should("osc.type = 0", osc.type).notBeEqualTo(0); | 54 Should("osc.type = 0", osc.type).notBeEqualTo(0); |
| 55 Should("osc.type", osc.type).beEqualTo(oldType); | 55 Should("osc.type", osc.type).beEqualTo(oldType); |
| 56 } | 56 } |
| 57 | 57 |
| 58 runTest(); | 58 runTest(); |
| 59 </script> | 59 </script> |
| 60 | 60 |
| 61 | 61 |
| 62 </body> | 62 </body> |
| 63 </html> | 63 </html> |
| OLD | NEW |