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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt_automation/pointerevents/pointerevent_common_input.js

Issue 2126323002: Add support for touch-action: pinch-zoom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add exception for mac Created 4 years, 3 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/imported/wpt_automation/pointerevents/pointerevent_common_input.js
diff --git a/third_party/WebKit/LayoutTests/imported/wpt_automation/pointerevents/pointerevent_common_input.js b/third_party/WebKit/LayoutTests/imported/wpt_automation/pointerevents/pointerevent_common_input.js
index 2d1456db32e6873e4c4eb03b288eef60cfd25e95..773c9d88caa2dcabf1fcd72121eb070b488f35ca 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt_automation/pointerevents/pointerevent_common_input.js
+++ b/third_party/WebKit/LayoutTests/imported/wpt_automation/pointerevents/pointerevent_common_input.js
@@ -138,6 +138,21 @@ function touchScrollInTarget(targetSelector, direction) {
});
}
+function pinchZoomInTarget(targetSelector, scale) {
+ return new Promise(function(resolve, reject) {
+ if (window.chrome && chrome.gpuBenchmarking) {
+ scrollPageIfNeeded(targetSelector, document);
+ var target = document.querySelector(targetSelector);
+ var targetRect = target.getBoundingClientRect();
+ chrome.gpuBenchmarking.pinchBy(scale, targetRect.left + (targetRect.width/2), targetRect.top + (targetRect.height/2), function() {
+ resolve();
+ });
+ } else {
+ reject();
+ }
+ });
+}
+
// Pen inputs.
function penMoveToDocument() {
return new Promise(function(resolve, reject) {

Powered by Google App Engine
This is Rietveld 408576698