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

Unified Diff: Source/web/tests/WebViewTest.cpp

Issue 225303014: [Pinch-to-zoom] Moved scale factor into PinchViewport (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed layout test breakage Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/tests/WebInputEventConversionTest.cpp ('k') | public/web/WebView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebViewTest.cpp
diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp
index 657f90fd4ad235d65cf08a92b501430f6b162905..b119287cff1b34e0f52eef90153aebc63e617e20 100644
--- a/Source/web/tests/WebViewTest.cpp
+++ b/Source/web/tests/WebViewTest.cpp
@@ -355,7 +355,7 @@ TEST_F(WebViewTest, HitTestResultAtWithPageScale)
negativeResult.reset();
// Scale page up 2x so image should occupy the whole viewport.
- webView->setPageScaleFactor(2.0f, WebPoint(0, 0));
+ webView->setPageScaleFactor(2.0f);
WebHitTestResult positiveResult = webView->hitTestResultAt(hitPoint);
ASSERT_EQ(WebNode::ElementNode, positiveResult.node().nodeType());
EXPECT_TRUE(positiveResult.node().to<WebElement>().hasTagName("img"));
@@ -781,7 +781,8 @@ TEST_F(WebViewTest, HistoryResetScrollAndScaleState)
EXPECT_EQ(0, webViewImpl->mainFrame()->scrollOffset().height);
// Make the page scale and scroll with the given paremeters.
- webViewImpl->setPageScaleFactor(2.0f, WebPoint(116, 84));
+ webViewImpl->setPageScaleFactor(2.0f);
+ webViewImpl->setMainFrameScrollOffset(WebPoint(116, 84));
EXPECT_EQ(2.0f, webViewImpl->pageScaleFactor());
EXPECT_EQ(116, webViewImpl->mainFrame()->scrollOffset().width);
EXPECT_EQ(84, webViewImpl->mainFrame()->scrollOffset().height);
@@ -821,7 +822,8 @@ TEST_F(WebViewTest, EnterFullscreenResetScrollAndScaleState)
EXPECT_EQ(0, webViewImpl->mainFrame()->scrollOffset().height);
// Make the page scale and scroll with the given paremeters.
- webViewImpl->setPageScaleFactor(2.0f, WebPoint(116, 84));
+ webViewImpl->setPageScaleFactor(2.0f);
+ webViewImpl->setMainFrameScrollOffset(WebPoint(116, 84));
EXPECT_EQ(2.0f, webViewImpl->pageScaleFactor());
EXPECT_EQ(116, webViewImpl->mainFrame()->scrollOffset().width);
EXPECT_EQ(84, webViewImpl->mainFrame()->scrollOffset().height);
@@ -1678,7 +1680,7 @@ void WebViewTest::testSelectionRootBounds(const char* htmlFile, float pageScaleF
WebView* webView = m_webViewHelper.initializeAndLoad(url, true);
webView->resize(WebSize(640, 480));
- webView->setPageScaleFactor(pageScaleFactor, WebPoint(0, 0));
+ webView->setPageScaleFactor(pageScaleFactor);
webView->layout();
runPendingTasks();
« no previous file with comments | « Source/web/tests/WebInputEventConversionTest.cpp ('k') | public/web/WebView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698