| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <body> | 3 <body> |
| 4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 description("Tests the DeviceLightEvent constructor."); | 6 description("Tests the DeviceLightEvent constructor."); |
| 7 | 7 |
| 8 var newEvent = new DeviceLightEvent("devicelight", { | 8 var newEvent = new DeviceLightEvent("devicelight", { |
| 9 bubbles: true, cancelable: false, | 9 bubbles: true, cancelable: false, |
| 10 value: 10 | 10 value: 10 |
| 11 }); | 11 }); |
| 12 | 12 |
| 13 var defaultEvent = new DeviceLightEvent("devicelight"); | 13 var defaultEvent = new DeviceLightEvent("devicelight"); |
| 14 | 14 |
| 15 shouldBeTrue("typeof newEvent.type == 'string'"); | 15 shouldBeTrue("typeof newEvent.type == 'string'"); |
| 16 shouldBeEqualToString("newEvent.type", "devicelight"); | 16 shouldBeEqualToString("newEvent.type", "devicelight"); |
| 17 shouldBeTrue("typeof newEvent.bubbles == 'boolean'"); | 17 shouldBeTrue("typeof newEvent.bubbles == 'boolean'"); |
| 18 shouldBeTrue("newEvent.bubbles"); | 18 shouldBeTrue("newEvent.bubbles"); |
| 19 shouldBeTrue("typeof newEvent.cancelable == 'boolean'"); | 19 shouldBeTrue("typeof newEvent.cancelable == 'boolean'"); |
| 20 shouldBeFalse("newEvent.cancelable") | 20 shouldBeFalse("newEvent.cancelable") |
| 21 shouldBeTrue("typeof newEvent.value == 'number'"); | 21 shouldBeTrue("typeof newEvent.value == 'number'"); |
| 22 shouldBeEqualToNumber('newEvent.value', 10); | 22 shouldBeEqualToNumber('newEvent.value', 10); |
| 23 | 23 |
| 24 // FIXME: Consider making bubbles property configurable. | 24 // FIXME: Consider making bubbles property configurable. |
| 25 shouldBeTrue("defaultEvent.bubbles"); | 25 shouldBeTrue("defaultEvent.bubbles"); |
| 26 shouldBeFalse("defaultEvent.cancelable"); | 26 shouldBeFalse("defaultEvent.cancelable"); |
| 27 shouldBe("defaultEvent.value", "Infinity"); | 27 shouldBe("defaultEvent.value", "Infinity"); |
| 28 </script> | 28 </script> |
| 29 </body> | 29 </body> |
| 30 </html> | 30 </html> |
| OLD | NEW |