Chromium Code Reviews| Index: LayoutTests/fast/events/uievent-with-inputdevice.html |
| diff --git a/LayoutTests/fast/events/uievent-with-inputdevice.html b/LayoutTests/fast/events/uievent-with-inputdevice.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f5ad50e9c7fb9ffd983e3a215709fef4595d0449 |
| --- /dev/null |
| +++ b/LayoutTests/fast/events/uievent-with-inputdevice.html |
| @@ -0,0 +1,19 @@ |
| +<head> |
| +<script src="../../resources/js-test.js"></script> |
| +</head> |
| +<body> |
| +<script> |
| + description("This tests that UIEvent will have sourceDevice set to be null by default, and it can also be passed when initialization.") |
| + |
| + event = document.createEvent('UIEvent'); |
| + shouldBeNonNull("event"); |
| + shouldBeNull("event.sourceDevice"); |
| + |
| + 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
|
| + shouldBeFalse("new UIEvent('eventType', { sourceDevice: new InputDevice({ firesTouchEvents: false }) }).sourceDevice.firesTouchEvents"); |
| + |
| + shouldBeNonNull("new UIEvent('eventType', { sourceDevice: new InputDevice({ firesTouchEvents: true }) }).sourceDevice"); |
|
tdresser
2015/06/05 12:35:38
Same as above.
|
| + shouldBeTrue("new UIEvent('eventType', { sourceDevice: new InputDevice({ firesTouchEvents: true }) }).sourceDevice.firesTouchEvents"); |
| + |
| +</script> |
| +</body> |