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

Unified Diff: LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page-zoomed.html

Issue 472463002: On some webpages, touch scrolling speed is too slow / fast (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed values in tests to address precision issues. Created 6 years, 2 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: LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page-zoomed.html
diff --git a/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page.html b/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page-zoomed.html
similarity index 73%
copy from LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page.html
copy to LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page-zoomed.html
index 29457952f7c28283be90121591a531047f4fa103..826045402be266d05c792a03a2d6f13b837a0cd6 100644
--- a/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page.html
+++ b/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page-zoomed.html
@@ -43,7 +43,7 @@ td {
var expectedGesturesTotal = 2;
var gesturesOccurred = 0;
var scrollAmountX = ['0', '0'];
-var scrollAmountY = ['70', '130'];
+var scrollAmountY = ['140', '40'];
var wheelEventsOccurred = 0;
var expectedWheelEventsOccurred = ['0', '0'];
var scrollEventsOccurred = 0;
@@ -52,19 +52,19 @@ var scrollEventsOccurred = 0;
var expectedScrollEventsOccurred = '1';
function recordScroll(event) {
- debug('scroll event ' + scrollEventsOccurred + '+> ' + event.target);
- scrollEventsOccurred++;
-
- if (window.eventSender) {
- // Because scroll events arrive asynchronously, only one will arrive.
- if (gesturesOccurred == expectedGesturesTotal) {
- shouldBe('scrollEventsOccurred', expectedScrollEventsOccurred);
- // If we've got here, we've passed.
- successfullyParsed = true;
- isSuccessfullyParsed();
- if (window.testRunner)
- testRunner.notifyDone();
- }
+ debug('scroll event ' + scrollEventsOccurred + '+> ' + event.target);
+ scrollEventsOccurred++;
+
+ if (window.eventSender) {
+ // Because scroll events arrive asynchronously, only one will arrive.
+ if (gesturesOccurred == expectedGesturesTotal) {
+ shouldBe('scrollEventsOccurred', expectedScrollEventsOccurred);
+ // If we've got here, we've passed.
+ successfullyParsed = true;
+ isSuccessfullyParsed();
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
}
}
@@ -74,7 +74,7 @@ function buildPage()
var table = document.getElementById('table_to_fill');
var targetHeight = document.body.offsetHeight;
var cellPairHeight = table.offsetHeight;
- var numberOfReps = targetHeight / cellPairHeight * 2;
+ var numberOfReps = targetHeight / cellPairHeight * 4;
var i;
for (i = 0; i < numberOfReps; i++) {
var p = document.createElement('tr');
@@ -92,6 +92,8 @@ function buildPage()
function firstGestureScroll()
{
debug("first gesture");
+
+ window.internals.setZoomFactor(0.5);
eventSender.gestureScrollBegin(10, 72);
eventSender.gestureScrollUpdate(0, -30);
eventSender.gestureScrollUpdate(0, -40);
@@ -104,9 +106,15 @@ function firstGestureScroll()
function secondGestureScroll()
{
debug("second gesture");
+
+ eventSender.gestureScrollBegin(10, 72);
+ eventSender.gestureScrollUpdate(0, 200);
+ eventSender.gestureScrollEnd(0, 0);
+
+ window.internals.setZoomFactor(2.0);
eventSender.gestureScrollBegin(800, 40);
- eventSender.gestureScrollUpdate(0, -30);
- eventSender.gestureScrollUpdate(0, -30);
+ eventSender.gestureScrollUpdate(0, -40);
+ eventSender.gestureScrollUpdate(0, -40);
eventSender.gestureScrollEnd(0, 0);
// Wait for layout.
@@ -120,7 +128,7 @@ function runTest()
{
buildPage();
if (window.eventSender) {
- description('This tests scroll gesture event scrolling on a whole page.');
+ description('This tests scroll gesture event scrolling on a whole page with browser zoom.');
if (checkTestDependencies())
firstGestureScroll();
else

Powered by Google App Engine
This is Rietveld 408576698