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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/pointerevents/pointerevent_touch-action-pinch_zoom_touch.html

Issue 2901203002: Rename VisualViewport properties to match updated spec (Closed)
Patch Set: Make methods const Created 3 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 unified diff | Download patch
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <!-- This test should be integrated into web-platform-test when the pinch-zoom 3 <!-- This test should be integrated into web-platform-test when the pinch-zoom
4 is accepted into the specification. 4 is accepted into the specification.
5 See https://github.com/w3c/pointerevents/issues/29 --> 5 See https://github.com/w3c/pointerevents/issues/29 -->
6 <head> 6 <head>
7 <title>touch-action: pinch-zoom</title> 7 <title>touch-action: pinch-zoom</title>
8 <meta name="assert" content="TA15.4 - With `touch-action: pinch-zoom` on a swiped or click/dragged element, only pinch zoom and two finger pan should be possible."> 8 <meta name="assert" content="TA15.4 - With `touch-action: pinch-zoom` on a swiped or click/dragged element, only pinch zoom and two finger pan should be possible.">
9 <meta name="viewport" content="width=device-width"> 9 <meta name="viewport" content="width=device-width">
10 <link rel="stylesheet" type="text/css" href="../../../external/wpt/point erevents/pointerevent_styles.css"> 10 <link rel="stylesheet" type="text/css" href="../../../external/wpt/point erevents/pointerevent_styles.css">
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 }); 93 });
94 94
95 // Check if "touch-action: pinch-zoom" attribute works properly 95 // Check if "touch-action: pinch-zoom" attribute works properly
96 //TA: 15.4 96 //TA: 15.4
97 on_event(btnComplete, 'click', function(event) { 97 on_event(btnComplete, 'click', function(event) {
98 detected_pointertypes[event.pointerType] = true; 98 detected_pointertypes[event.pointerType] = true;
99 test_touchaction.step(function() { 99 test_touchaction.step(function() {
100 assert_true(scrollListenerExecuted, "scroll listener sho uld not have been executed by the end of the test"); 100 assert_true(scrollListenerExecuted, "scroll listener sho uld not have been executed by the end of the test");
101 assert_equals(target0.scrollLeft, 0, "scroll x offset sh ould be 0 in the end of the test"); 101 assert_equals(target0.scrollLeft, 0, "scroll x offset sh ould be 0 in the end of the test");
102 assert_equals(target0.scrollTop, 0, "scroll y offset sho uld be 0 in the end of the test"); 102 assert_equals(target0.scrollTop, 0, "scroll y offset sho uld be 0 in the end of the test");
103 assert_greater_than(window.visualViewport.scale, 1, "sca le should be greater than 1 in the end of the test"); 103 assert_greater_than(window.view.scale, 1, "scale should be greater than 1 in the end of the test");
104 }); 104 });
105 test_touchaction.done(); 105 test_touchaction.done();
106 updateDescriptionComplete(); 106 updateDescriptionComplete();
107 }); 107 });
108 } 108 }
109 </script> 109 </script>
110 <h1>touch-action: pinch-zoom</h1> 110 <h1>touch-action: pinch-zoom</h1>
111 <div id="complete-notice"> 111 <div id="complete-notice">
112 <p>The following pointer types were detected: <span id="pointertype- log"></span>.</p> 112 <p>The following pointer types were detected: <span id="pointertype- log"></span>.</p>
113 </div> 113 </div>
114 <div id="log"></div> 114 <div id="log"></div>
115 115
116 <script> 116 <script>
117 function inject_input() { 117 function inject_input() {
118 return touchScrollInTarget('#target0', 'down').then(function() { 118 return touchScrollInTarget('#target0', 'down').then(function() {
119 return pinchZoomInTarget('#target0', 3.0); 119 return pinchZoomInTarget('#target0', 3.0);
120 }).then(function() { 120 }).then(function() {
121 document.getElementById("btnComplete").click(); 121 document.getElementById("btnComplete").click();
122 }); 122 });
123 } 123 }
124 </script> 124 </script>
125 <script src='../../../external/wpt_automation/pointerevents/pointerevent _common_input.js'></script> 125 <script src='../../../external/wpt_automation/pointerevents/pointerevent _common_input.js'></script>
126 </body> 126 </body>
127 </html> 127 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698