Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <html> | |
|
Inactive
2014/05/06 12:58:08
Missing DOCTYPE
riju_
2014/05/09 12:00:21
Done.
| |
| 2 <head> | |
| 3 <script src="../../../resources/js-test.js"></script> | |
| 4 </head> | |
| 5 <body> | |
| 6 <script> | |
| 7 description("Tests that document.createEvent() works with DeviceLightEvent."); | |
| 8 | |
| 9 var event = document.createEvent('DeviceLightEvent'); | |
|
Inactive
2014/05/06 12:58:08
It would be good to test the modern way of creatin
riju_
2014/05/09 12:00:21
Done.
| |
| 10 | |
|
Inactive
2014/05/06 12:58:08
shouldBe("event.__proto__", "DeviceLightEvent.prot
riju_
2014/05/09 12:00:21
Done.
| |
| 11 shouldBeTrue("typeof event == 'object'"); | |
| 12 | |
| 13 shouldBeTrue("'type' in event"); | |
| 14 shouldBeTrue("'bubbles' in event"); | |
| 15 shouldBeTrue("'cancelable' in event"); | |
| 16 shouldBeTrue("'value' in event"); | |
| 17 | |
| 18 shouldBeTrue("typeof event.type == 'string'"); | |
|
Inactive
2014/05/06 12:58:08
You should also check that type is "devicelight".
riju_
2014/05/09 12:00:21
Done.
| |
| 19 shouldBeTrue("typeof event.bubbles == 'boolean'"); | |
|
Inactive
2014/05/06 12:58:08
You should also check that bubbles is true.
riju_
2014/05/09 12:00:21
Done.
| |
| 20 shouldBeTrue("typeof event.cancelable == 'boolean'"); | |
|
Inactive
2014/05/06 12:58:08
You should also check that cancelable is false.
riju_
2014/05/09 12:00:21
Done.
| |
| 21 shouldBeTrue("typeof event.value == 'number'"); | |
|
Inactive
2014/05/06 12:58:08
You should check the value as well.
riju_
2014/05/09 12:00:21
Done.
| |
| 22 </script> | |
| 23 </body> | |
| 24 </html> | |
| OLD | NEW |