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

Unified Diff: LayoutTests/fast/events/touch/create-touch-event-source-device.html

Issue 1161783006: Populates sourceDevice attribute into TouchEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: sourceDevice set to null from Javascript 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/touch/create-touch-event-source-device.html
diff --git a/LayoutTests/fast/events/touch/create-touch-event-source-device.html b/LayoutTests/fast/events/touch/create-touch-event-source-device.html
new file mode 100644
index 0000000000000000000000000000000000000000..6182b173bf85c0759cad1f6f831215a3e3ea9584
--- /dev/null
+++ b/LayoutTests/fast/events/touch/create-touch-event-source-device.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script type="text/javascript">
+description('Test that touch events should have a sourceDevice and its firesTouchEvents should be true.');
+
+var event = null;
+
+try
+{
+ event = document.createEvent("TouchEvent");
+ shouldBeNonNull("event");
+ shouldBeNull("event.sourceDevice");
+}
+catch (e)
+{
+ testFailed("An exception was thrown: " + e.message);
tdresser 2015/06/08 12:36:39 What exception are you worried about here? Would
lanwei 2015/06/09 20:07:10 You are right, if it is null, the test will fail.
+}
+
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698