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

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

Issue 175253002: Switch to HarfBuzz on Mac and remove CoreText shaper (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased on master, TestExpectations tuned, ready to land? 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 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/frame/FrameHost.h" 9 #include "core/frame/FrameHost.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 FrameTestHelpers::loadHistoryItem(webViewImpl()->mainFrame(), item, WebHisto ryDifferentDocumentLoad, WebURLRequest::UseProtocolCachePolicy); 711 FrameTestHelpers::loadHistoryItem(webViewImpl()->mainFrame(), item, WebHisto ryDifferentDocumentLoad, WebURLRequest::UseProtocolCachePolicy);
712 712
713 PinchViewport& pinchViewport = frame()->page()->frameHost().pinchViewport(); 713 PinchViewport& pinchViewport = frame()->page()->frameHost().pinchViewport();
714 EXPECT_EQ(2, pinchViewport.scale()); 714 EXPECT_EQ(2, pinchViewport.scale());
715 EXPECT_POINT_EQ(IntPoint(100, 150), frame()->view()->scrollPosition()); 715 EXPECT_POINT_EQ(IntPoint(100, 150), frame()->view()->scrollPosition());
716 EXPECT_FLOAT_POINT_EQ(FloatPoint(20, 30), pinchViewport.visibleRect().locati on()); 716 EXPECT_FLOAT_POINT_EQ(FloatPoint(20, 30), pinchViewport.visibleRect().locati on());
717 } 717 }
718 718
719 // Test that the coordinates sent into moveRangeSelection are offset by the 719 // Test that the coordinates sent into moveRangeSelection are offset by the
720 // pinch viewport's location. 720 // pinch viewport's location.
721 TEST_F(PinchViewportTest, TestWebFrameRangeAccountsForPinchViewportScroll) 721 TEST_F(PinchViewportTest, DISABLED_TestWebFrameRangeAccountsForPinchViewportScro ll)
722 { 722 {
723 initializeWithDesktopSettings(); 723 initializeWithDesktopSettings();
724 webViewImpl()->settings()->setDefaultFontSize(12); 724 webViewImpl()->settings()->setDefaultFontSize(12);
725 webViewImpl()->resize(WebSize(640, 480)); 725 webViewImpl()->resize(WebSize(640, 480));
726 registerMockedHttpURLLoad("move_range.html"); 726 registerMockedHttpURLLoad("move_range.html");
727 navigateTo(m_baseURL + "move_range.html"); 727 navigateTo(m_baseURL + "move_range.html");
728 728
729 WebRect baseRect; 729 WebRect baseRect;
730 WebRect extentRect; 730 WebRect extentRect;
731 731
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 pinchViewport.scrollIntoView(FloatRect(50, 75, 50, 75)); 913 pinchViewport.scrollIntoView(FloatRect(50, 75, 50, 75));
914 EXPECT_POINT_EQ(IntPoint(50, 75), frame()->view()->scrollPosition()); 914 EXPECT_POINT_EQ(IntPoint(50, 75), frame()->view()->scrollPosition());
915 EXPECT_FLOAT_POINT_EQ(FloatPoint(), pinchViewport.visibleRect().location()); 915 EXPECT_FLOAT_POINT_EQ(FloatPoint(), pinchViewport.visibleRect().location());
916 916
917 pinchViewport.scrollIntoView(FloatRect(190, 290, 10, 10)); 917 pinchViewport.scrollIntoView(FloatRect(190, 290, 10, 10));
918 EXPECT_POINT_EQ(IntPoint(100, 150), frame()->view()->scrollPosition()); 918 EXPECT_POINT_EQ(IntPoint(100, 150), frame()->view()->scrollPosition());
919 EXPECT_FLOAT_POINT_EQ(FloatPoint(50, 75), pinchViewport.visibleRect().locati on()); 919 EXPECT_FLOAT_POINT_EQ(FloatPoint(50, 75), pinchViewport.visibleRect().locati on());
920 } 920 }
921 921
922 } // namespace 922 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698