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

Side by Side Diff: Source/web/tests/PinchViewportTest.cpp

Issue 1052433003: Allow postponed rail application for touch scrolling - blink side. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix broken test. Created 5 years, 8 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "core/frame/PinchViewport.h" 7 #include "core/frame/PinchViewport.h"
8 8
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/frame/FrameHost.h" 10 #include "core/frame/FrameHost.h"
(...skipping 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 1591
1592 EXPECT_POINT_EQ(FloatPoint(300, 200), pinchViewport.location()); 1592 EXPECT_POINT_EQ(FloatPoint(300, 200), pinchViewport.location());
1593 1593
1594 // Send a scroll event on the main thread path. 1594 // Send a scroll event on the main thread path.
1595 PlatformGestureEvent gsu( 1595 PlatformGestureEvent gsu(
1596 PlatformEvent::GestureScrollUpdate, 1596 PlatformEvent::GestureScrollUpdate,
1597 IntPoint(0, 0), 1597 IntPoint(0, 0),
1598 IntPoint(0, 0), 1598 IntPoint(0, 0),
1599 IntSize(5, 5), 1599 IntSize(5, 5),
1600 0, false, false, false, false); 1600 0, false, false, false, false);
1601 gsu.setScrollGestureData(-50, -60, 1, 1, false, false); 1601 gsu.setScrollGestureData(-50, -60, 1, 1, false, false, PlatformEvent::RailsM odeFree);
1602 1602
1603 frame()->eventHandler().handleGestureEvent(gsu); 1603 frame()->eventHandler().handleGestureEvent(gsu);
1604 1604
1605 // The scroll sent from the impl-side must not be overwritten. 1605 // The scroll sent from the impl-side must not be overwritten.
1606 EXPECT_POINT_EQ(FloatPoint(350, 260), pinchViewport.location()); 1606 EXPECT_POINT_EQ(FloatPoint(350, 260), pinchViewport.location());
1607 } 1607 }
1608 1608
1609 static void accessibilitySettings(WebSettings* settings) 1609 static void accessibilitySettings(WebSettings* settings)
1610 { 1610 {
1611 PinchViewportTest::configureSettings(settings); 1611 PinchViewportTest::configureSettings(settings);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1666 EXPECT_FLOAT_POINT_EQ(FloatPoint(81, 100.8), pinchViewport.rootFrameToViewpo rt(FloatPoint(50.5, 62.4))); 1666 EXPECT_FLOAT_POINT_EQ(FloatPoint(81, 100.8), pinchViewport.rootFrameToViewpo rt(FloatPoint(50.5, 62.4)));
1667 1667
1668 1668
1669 // Scrolling the main frame should have no effect. 1669 // Scrolling the main frame should have no effect.
1670 frameView.scrollTo(DoublePoint(100, 120)); 1670 frameView.scrollTo(DoublePoint(100, 120));
1671 EXPECT_FLOAT_POINT_EQ(FloatPoint(50, 62), pinchViewport.viewportToRootFrame( FloatPoint(80, 100))); 1671 EXPECT_FLOAT_POINT_EQ(FloatPoint(50, 62), pinchViewport.viewportToRootFrame( FloatPoint(80, 100)));
1672 EXPECT_FLOAT_POINT_EQ(FloatPoint(80, 100), pinchViewport.rootFrameToViewport (FloatPoint(50, 62))); 1672 EXPECT_FLOAT_POINT_EQ(FloatPoint(80, 100), pinchViewport.rootFrameToViewport (FloatPoint(50, 62)));
1673 } 1673 }
1674 1674
1675 } // namespace 1675 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698