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

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

Issue 1160753005: Implement UIEvent.sourceDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Change unittest Created 5 years, 7 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
new file mode 100644
index 0000000000000000000000000000000000000000..9ce4f05ddd3fc763767cd0128c1bc9897895f3e0
--- /dev/null
+++ b/LayoutTests/fast/events/uievent-with-inputdevice.html
@@ -0,0 +1,29 @@
+<head>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+ description("This tests that all the subclasses of UIEvent will have sourceDevice set to be null by default, and it can also be passed when initialization.")
tdresser 2015/06/01 17:36:46 We aren't actually checking if sourceDevice is set
+
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ }
+
+ var firesTouchEvents = false;
+ document.addEventListener("click", function(event) { firesTouchEvents = event.sourceDevice.firesTouchEvents; } );
+
+ var e = new MouseEvent('click');
+
+ document.dispatchEvent(e);
+
+ shouldBeFalse('firesTouchEvents');
+
+ if (window.internals) {
+ internals.setFiresTouchEvents(e, true);
+ }
+ document.dispatchEvent(e);
+
+ shouldBeTrue('firesTouchEvents');
+
+</script>
+</body>
« no previous file with comments | « no previous file | LayoutTests/fast/events/uievent-with-inputdevice-expected.txt » ('j') | Source/core/events/UIEvent.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698