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

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

Issue 618723003: Revert of Switch to HarfBuzz on Mac and remove CoreText shaper (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « Source/platform/fonts/skia/SimpleFontDataSkia.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 FrameTestHelpers::loadHistoryItem(webViewImpl()->mainFrame(), item, WebHisto ryDifferentDocumentLoad, WebURLRequest::UseProtocolCachePolicy); 723 FrameTestHelpers::loadHistoryItem(webViewImpl()->mainFrame(), item, WebHisto ryDifferentDocumentLoad, WebURLRequest::UseProtocolCachePolicy);
724 724
725 PinchViewport& pinchViewport = frame()->page()->frameHost().pinchViewport(); 725 PinchViewport& pinchViewport = frame()->page()->frameHost().pinchViewport();
726 EXPECT_EQ(2, pinchViewport.scale()); 726 EXPECT_EQ(2, pinchViewport.scale());
727 EXPECT_POINT_EQ(IntPoint(100, 150), frame()->view()->scrollPosition()); 727 EXPECT_POINT_EQ(IntPoint(100, 150), frame()->view()->scrollPosition());
728 EXPECT_FLOAT_POINT_EQ(FloatPoint(20, 30), pinchViewport.visibleRect().locati on()); 728 EXPECT_FLOAT_POINT_EQ(FloatPoint(20, 30), pinchViewport.visibleRect().locati on());
729 } 729 }
730 730
731 // Test that the coordinates sent into moveRangeSelection are offset by the 731 // Test that the coordinates sent into moveRangeSelection are offset by the
732 // pinch viewport's location. 732 // pinch viewport's location.
733 TEST_F(PinchViewportTest, DISABLED_TestWebFrameRangeAccountsForPinchViewportScro ll) 733 TEST_F(PinchViewportTest, TestWebFrameRangeAccountsForPinchViewportScroll)
734 { 734 {
735 initializeWithDesktopSettings(); 735 initializeWithDesktopSettings();
736 webViewImpl()->settings()->setDefaultFontSize(12); 736 webViewImpl()->settings()->setDefaultFontSize(12);
737 webViewImpl()->resize(WebSize(640, 480)); 737 webViewImpl()->resize(WebSize(640, 480));
738 registerMockedHttpURLLoad("move_range.html"); 738 registerMockedHttpURLLoad("move_range.html");
739 navigateTo(m_baseURL + "move_range.html"); 739 navigateTo(m_baseURL + "move_range.html");
740 740
741 WebRect baseRect; 741 WebRect baseRect;
742 WebRect extentRect; 742 WebRect extentRect;
743 743
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 pinchViewport.scrollIntoView(FloatRect(50, 75, 50, 75)); 925 pinchViewport.scrollIntoView(FloatRect(50, 75, 50, 75));
926 EXPECT_POINT_EQ(IntPoint(50, 75), frame()->view()->scrollPosition()); 926 EXPECT_POINT_EQ(IntPoint(50, 75), frame()->view()->scrollPosition());
927 EXPECT_FLOAT_POINT_EQ(FloatPoint(), pinchViewport.visibleRect().location()); 927 EXPECT_FLOAT_POINT_EQ(FloatPoint(), pinchViewport.visibleRect().location());
928 928
929 pinchViewport.scrollIntoView(FloatRect(190, 290, 10, 10)); 929 pinchViewport.scrollIntoView(FloatRect(190, 290, 10, 10));
930 EXPECT_POINT_EQ(IntPoint(100, 150), frame()->view()->scrollPosition()); 930 EXPECT_POINT_EQ(IntPoint(100, 150), frame()->view()->scrollPosition());
931 EXPECT_FLOAT_POINT_EQ(FloatPoint(50, 75), pinchViewport.visibleRect().locati on()); 931 EXPECT_FLOAT_POINT_EQ(FloatPoint(50, 75), pinchViewport.visibleRect().locati on());
932 } 932 }
933 933
934 } // namespace 934 } // namespace
OLDNEW
« no previous file with comments | « Source/platform/fonts/skia/SimpleFontDataSkia.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698