Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <head> | |
| 2 <script src="../../resources/js-test.js"></script> | |
| 3 </head> | |
| 4 <body> | |
| 5 <script> | |
| 6 description("This tests that UIEvent will have sourceDevice set to be null b y default, and it can also be passed when initialization.") | |
| 7 | |
| 8 event = document.createEvent('UIEvent'); | |
| 9 shouldBeNonNull("event"); | |
| 10 shouldBeNull("event.sourceDevice"); | |
| 11 | |
| 12 shouldBeNonNull("new UIEvent('eventType', { sourceDevice: new InputDevice({ firesTouchEvents: false }) }).sourceDevice"); | |
|
tdresser
2015/06/05 12:35:38
Might as well create and cache this UIEvent, inste
| |
| 13 shouldBeFalse("new UIEvent('eventType', { sourceDevice: new InputDevice({ fi resTouchEvents: false }) }).sourceDevice.firesTouchEvents"); | |
| 14 | |
| 15 shouldBeNonNull("new UIEvent('eventType', { sourceDevice: new InputDevice({ firesTouchEvents: true }) }).sourceDevice"); | |
|
tdresser
2015/06/05 12:35:38
Same as above.
| |
| 16 shouldBeTrue("new UIEvent('eventType', { sourceDevice: new InputDevice({ fir esTouchEvents: true }) }).sourceDevice.firesTouchEvents"); | |
| 17 | |
| 18 </script> | |
| 19 </body> | |
| OLD | NEW |