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

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

Issue 2127303002: Make the crashed web platform pointerevent tests pass (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use ScrollTo to move the target into the view bound 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
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2604f6973da9886d0b1dc66695cffdccea9c268b..9c23f183731dd5c6bcdfe158d5a8092479f11ed4 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
@@ -59,6 +59,8 @@ function touchTapInTarget(targetId) {
if (window.chrome && chrome.gpuBenchmarking) {
var target = document.getElementById(targetId);
var targetRect = target.getBoundingClientRect();
+ window.scrollTo(targetRect.left, targetRect.top);
+ targetRect = target.getBoundingClientRect();
chrome.gpuBenchmarking.tap(targetRect.left+5, targetRect.top+5);
}
}
@@ -67,6 +69,8 @@ function touchScrollUpInTarget(targetId) {
if (window.chrome && chrome.gpuBenchmarking) {
var target = document.getElementById(targetId);
var targetRect = target.getBoundingClientRect();
+ window.scrollTo(targetRect.left, targetRect.top);
+ targetRect = target.getBoundingClientRect();
chrome.gpuBenchmarking.smoothDrag(targetRect.left, targetRect.bottom-5, targetRect.left, targetRect.top+5);
}
}
@@ -75,6 +79,8 @@ function touchScrollLeftInTarget(targetId) {
if (window.chrome && chrome.gpuBenchmarking) {
var target = document.getElementById(targetId);
var targetRect = target.getBoundingClientRect();
+ window.scrollTo(targetRect.left, targetRect.top);
+ targetRect = target.getBoundingClientRect();
chrome.gpuBenchmarking.smoothDrag(targetRect.right-5, targetRect.top+5, targetRect.left+5, targetRect.top+5);
}
}
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698