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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/input/emulateTouchFromMouseEvent.html

Issue 2127163002: Limit PassiveDocumentEventListeners to touch and make it experimental (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: A few more layout tests Created 4 years, 5 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: third_party/WebKit/LayoutTests/inspector-protocol/input/emulateTouchFromMouseEvent.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/input/emulateTouchFromMouseEvent.html b/third_party/WebKit/LayoutTests/inspector-protocol/input/emulateTouchFromMouseEvent.html
index f141e8c2f62b1cca13672f2380f7ca1c996a2d7d..422d4e5451204e22b1e21aa4fa6a73fc1d19f27f 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/input/emulateTouchFromMouseEvent.html
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/input/emulateTouchFromMouseEvent.html
@@ -3,10 +3,14 @@
<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
<script>
-window.addEventListener("touchstart", logEvent);
-window.addEventListener("touchend", logEvent);
-window.addEventListener("touchmove", logEvent);
-window.addEventListener("touchcancel", logEvent);
+function setupAndRunTest() {
+ var content = document.getElementById("content");
+ content.addEventListener("touchstart", logEvent);
Rick Byers 2016/07/07 20:02:09 any reason to change the target instead of making
dtapuska 2016/07/07 20:34:21 Again; trying to future proof it but I don't have
+ content.addEventListener("touchend", logEvent);
+ content.addEventListener("touchmove", logEvent);
+ content.addEventListener("touchcancel", logEvent);
+ runTest();
+}
function logEvent(event)
{
@@ -125,6 +129,8 @@ function test()
</script>
</head>
-<body onload="runTest()">
+<body onload="setupAndRunTest()">
+<div style="width: 100%; height: 100%" id="content">
+</div>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698