| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Test Constructor: AudioBufferSource</title> | 4 <title>Test Constructor: AudioBufferSource</title> |
| 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/audio-testing.js"></script> | 7 <script src="../resources/audio-testing.js"></script> |
| 8 <script src="audionodeoptions.js"></script> | 8 <script src="audionodeoptions.js"></script> |
| 9 </head> | 9 </head> |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 .beEqualTo(factoryNode[name]) && success; | 76 .beEqualTo(factoryNode[name]) && success; |
| 77 } | 77 } |
| 78 } | 78 } |
| 79 | 79 |
| 80 Should("AudioBufferSourceNode constructed", success) | 80 Should("AudioBufferSourceNode constructed", success) |
| 81 .summarize("correctly", "incorrectly"); | 81 .summarize("correctly", "incorrectly"); |
| 82 | 82 |
| 83 taskDone(); | 83 taskDone(); |
| 84 }); | 84 }); |
| 85 | 85 |
| 86 audit.defineTask("nullable buffer", function (taskDone) { |
| 87 var node; |
| 88 var success = true; |
| 89 |
| 90 var options = { buffer: null }; |
| 91 |
| 92 success = Should("node = new AudioBufferSourceNode(c, " + JSON.stringify
(options), function () { |
| 93 node = new AudioBufferSourceNode(context, options); |
| 94 }).notThrow(); |
| 95 |
| 96 success = Should("node.buffer", node.buffer) |
| 97 .beEqualTo(null); |
| 98 |
| 99 Should("Null buffer in constructor handled", success) |
| 100 .summarize( |
| 101 "correctly", |
| 102 "incorrectly"); |
| 103 |
| 104 taskDone(); |
| 105 }); |
| 106 |
| 86 audit.defineTask("constructor options", function (taskDone) { | 107 audit.defineTask("constructor options", function (taskDone) { |
| 87 var node; | 108 var node; |
| 88 var success = true; | 109 var success = true; |
| 89 | 110 |
| 90 var buffer = context.createBuffer(2, 1000, context.sampleRate); | 111 var buffer = context.createBuffer(2, 1000, context.sampleRate); |
| 91 | 112 |
| 92 var options = { | 113 var options = { |
| 93 buffer: buffer, | 114 buffer: buffer, |
| 94 detune: .5, | 115 detune: .5, |
| 95 loop: true, | 116 loop: true, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 Should("AudioBufferSource with options cosntructed", success) | 151 Should("AudioBufferSource with options cosntructed", success) |
| 131 .summarize("correctly", "incorrectly"); | 152 .summarize("correctly", "incorrectly"); |
| 132 | 153 |
| 133 taskDone(); | 154 taskDone(); |
| 134 }); | 155 }); |
| 135 | 156 |
| 136 audit.runTasks(); | 157 audit.runTasks(); |
| 137 </script> | 158 </script> |
| 138 </body> | 159 </body> |
| 139 </html> | 160 </html> |
| OLD | NEW |