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

Unified Diff: LayoutTests/fast/events/mouse-event-from-touch-source-device-event-sender.html

Issue 1174683004: Populates sourceDevice attribute into MouseEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Create a new init function 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/mouse-event-from-touch-source-device-event-sender.html
diff --git a/LayoutTests/fast/events/mouse-event-from-touch-source-device-event-sender.html b/LayoutTests/fast/events/mouse-event-from-touch-source-device-event-sender.html
new file mode 100644
index 0000000000000000000000000000000000000000..e6bea6a59b1e445a847ea18d266d82213288fac5
--- /dev/null
+++ b/LayoutTests/fast/events/mouse-event-from-touch-source-device-event-sender.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<script src="../../resources/js-test.js"></script>
+<script type="text/javascript">
+description('Test that synthetic mouse events from touch events should have a sourceDevice and its firesTouchEvents should be true.');
+
+function mouseHandler(event) {
+ debug(event.type);
+ shouldBeNonNull("event.sourceDevice");
+ shouldBeTrue("event.sourceDevice.firesTouchEvents");
+}
+
+if (window.eventSender) {
+
+ document.addEventListener("mousedown", mouseHandler);
+ document.addEventListener("mousemove", mouseHandler);
+ document.addEventListener("mouseup", mouseHandler);
Rick Byers 2015/06/23 00:55:57 nit: please add a 'click' handler too. You can do
lanwei 2015/06/23 22:19:20 Done.
+
+ debug('Sending gestureTap which synthesizes mousemove, mousedown and mouseup');
+ eventSender.gestureTap(10, 10);
+
+} else {
+ debug('This test requires eventSender.');
+}
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698