Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: LayoutTests/fast/events/uievent-with-inputdevice.html

Issue 1161783006: Populates sourceDevice attribute into TouchEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Put touchevent in uievent layout test Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
index 63b4146231624cf8e385d2ffff74dc30136be388..d5ef4d67d12af2d22e49541a49af41a1b2e8085f 100644
--- a/LayoutTests/fast/events/uievent-with-inputdevice.html
+++ b/LayoutTests/fast/events/uievent-with-inputdevice.html
@@ -1,21 +1,21 @@
-<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.")
+ description("This tests that UIEvent and its subclass will have sourceDevice set to be null by default, and it can also be passed when initialization.")
- var event = document.createEvent('UIEvent');
- shouldBeNonNull("event");
- shouldBeNull("event.sourceDevice");
+ var uievent = document.createEvent('UIEvent');
+ shouldBeNonNull("uievent");
+ shouldBeNull("uievent.sourceDevice");
- event = new UIEvent('eventType', { sourceDevice: new InputDevice({ firesTouchEvents: false }) });
- shouldBeNonNull("event.sourceDevice");
- shouldBeFalse("event.sourceDevice.firesTouchEvents");
+ uievent = new UIEvent('eventType', { sourceDevice: new InputDevice({ firesTouchEvents: false }) });
+ shouldBeNonNull("uievent.sourceDevice");
+ shouldBeFalse("uievent.sourceDevice.firesTouchEvents");
- event = new UIEvent('eventType', { sourceDevice: new InputDevice({ firesTouchEvents: true }) });
- shouldBeNonNull("event.sourceDevice");
- shouldBeTrue("event.sourceDevice.firesTouchEvents");
+ uievent = new UIEvent('eventType', { sourceDevice: new InputDevice({ firesTouchEvents: true }) });
+ shouldBeNonNull("uievent.sourceDevice");
+ shouldBeTrue("uievent.sourceDevice.firesTouchEvents");
+
+ var touchevent = document.createEvent("TouchEvent");
+ shouldBeNonNull("touchevent");
+ shouldBeNull("touchevent.sourceDevice");
-</script>
-</body>
+</script>

Powered by Google App Engine
This is Rietveld 408576698