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