| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Test Constructor: StereoPanner</title> | 4 <title>Test Constructor: StereoPanner</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/audit-util.js"></script> | 7 <script src="../resources/audit-util.js"></script> |
| 8 <script src="../resources/audio-testing.js"></script> | 8 <script src="../resources/audio-testing.js"></script> |
| 9 <script src="audionodeoptions.js"></script> | 9 <script src="audionodeoptions.js"></script> |
| 10 </head> | 10 </head> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 "correctly threw errors", | 42 "correctly threw errors", |
| 43 "did not throw errors in all cases"); | 43 "did not throw errors in all cases"); |
| 44 | 44 |
| 45 taskDone(); | 45 taskDone(); |
| 46 }); | 46 }); |
| 47 | 47 |
| 48 audit.defineTask("default constructor", function (taskDone) { | 48 audit.defineTask("default constructor", function (taskDone) { |
| 49 var node; | 49 var node; |
| 50 var success = true; | 50 var success = true; |
| 51 | 51 |
| 52 success = Should("node = new StereoPannerNode(context)", function () { | 52 success = Should("node0 = new StereoPannerNode(context)", function () { |
| 53 node = new StereoPannerNode(context); | 53 node = new StereoPannerNode(context); |
| 54 }).notThrow(); | 54 }).notThrow(); |
| 55 success = Should("node instanceof StereoPannerNode", node instanceof Ste
reoPannerNode) | 55 success = Should("node0 instanceof StereoPannerNode", node instanceof St
ereoPannerNode) |
| 56 .beEqualTo(true) && success; | 56 .beEqualTo(true) && success; |
| 57 | 57 |
| 58 success = Should("node.pan.value", node.pan.value) | 58 success = Should("node0.pan.value", node.pan.value) |
| 59 .beEqualTo(0) && success; | 59 .beEqualTo(0) && success; |
| 60 | 60 |
| 61 Should("new StereoPannerNode(context)", success) | 61 Should("new StereoPannerNode(context)", success) |
| 62 .summarize( | 62 .summarize( |
| 63 "constructed node with correct attributes", | 63 "constructed node with correct attributes", |
| 64 "did not construct correct node correctly") | 64 "did not construct correct node correctly") |
| 65 | 65 |
| 66 taskDone(); | 66 taskDone(); |
| 67 }); | 67 }); |
| 68 | 68 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 taskDone(); | 193 taskDone(); |
| 194 }); | 194 }); |
| 195 | 195 |
| 196 audit.defineTask("constructor with options", function (taskDone) { | 196 audit.defineTask("constructor with options", function (taskDone) { |
| 197 var node; | 197 var node; |
| 198 var success = true; | 198 var success = true; |
| 199 var options = { | 199 var options = { |
| 200 pan: 0.75, | 200 pan: 0.75, |
| 201 }; | 201 }; |
| 202 | 202 |
| 203 success = Should("node = new StereoPannerNode(, " + JSON.stringify(optio
ns) + ")", | 203 success = Should("node1 = new StereoPannerNode(, " + JSON.stringify(opti
ons) + ")", |
| 204 function () { | 204 function () { |
| 205 node = new StereoPannerNode(context, options); | 205 node = new StereoPannerNode(context, options); |
| 206 }).notThrow(); | 206 }).notThrow(); |
| 207 success = Should("node instanceof StereoPannerNode", node instanceof Ste
reoPannerNode) | 207 success = Should("node1 instanceof StereoPannerNode", node instanceof St
ereoPannerNode) |
| 208 .beEqualTo(true) && success; | 208 .beEqualTo(true) && success; |
| 209 | 209 |
| 210 success = Should("node.pan.value", node.pan.value) | 210 success = Should("node1.pan.value", node.pan.value) |
| 211 .beEqualTo(options.pan) && success; | 211 .beEqualTo(options.pan) && success; |
| 212 | 212 |
| 213 Should("new StereoPannerNode() with options", success) | 213 Should("new StereoPannerNode() with options", success) |
| 214 .summarize( | 214 .summarize( |
| 215 "constructed with correct attributes", | 215 "constructed with correct attributes", |
| 216 "was not constructed correctly"); | 216 "was not constructed correctly"); |
| 217 | 217 |
| 218 taskDone(); | 218 taskDone(); |
| 219 }); | 219 }); |
| 220 | 220 |
| 221 audit.runTasks(); | 221 audit.runTasks(); |
| 222 </script> | 222 </script> |
| 223 </body> | 223 </body> |
| 224 </html> | 224 </html> |
| OLD | NEW |