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: content/test/data/page_with_touch_handler.html

Issue 1729373003: Implement touch events for site-isolation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use positioned iframe in test to simplify event targeting. Created 4 years, 10 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/page_with_touch_handler.html
diff --git a/content/test/data/page_with_touch_handler.html b/content/test/data/page_with_touch_handler.html
new file mode 100644
index 0000000000000000000000000000000000000000..80ac303d340ad848b55ed48df0f722c4589e971c
--- /dev/null
+++ b/content/test/data/page_with_touch_handler.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html style="width: 100%; height: 100%">
+<head>
+ <script>
+ function touchHandler(e, type) {
+ var touchResult = document.getElementById("last-touch-event");
+ touchResult.innerHTML = type;
+ }
+
+ function getLastTouchEvent() {
+ var touchResult = document.getElementById("last-touch-event");
+ return touchResult.innerHTML;
+ }
+
+ window.addEventListener('load', function(){ // on page load
+ document.body.addEventListener('touchstart',
+ function(e){
+ touchHandler(e, "touchstart");
+ }, false);
+
+ document.body.addEventListener('touchmove',
+ function(e){
+ touchHandler(e, "touchmove");
+ }, false);
+
+ document.body.addEventListener('touchend',
+ function(e){
+ touchHandler(e, "touchend");
+ }, false);
+ }, false);
+ </script>
+</head>
+
+<!-- Be sure to set 100% width/height so the test can determine an appropriate
+ screen region for targeting events. -->
+<body style="width: 100%; height: 100%">
+ Page with Touch Handler
+ <div id="last-touch-event">noevent</div>
+</body>
+</html>
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698