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

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

Issue 31063004: Have Frame::loader() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
« no previous file with comments | « Source/web/tests/WebFrameTest.cpp ('k') | no next file » | 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 5e6169a87cc858d442d3f49ae791a1d2665ebcb5..e8a0736e962810bdc122dc73516f81a8012c26c9 100644
--- a/Source/web/tests/WebViewTest.cpp
+++ b/Source/web/tests/WebViewTest.cpp
@@ -719,7 +719,7 @@ TEST_F(WebViewTest, HistoryResetScrollAndScaleState)
EXPECT_EQ(2.0f, webViewImpl->pageScaleFactor());
EXPECT_EQ(116, webViewImpl->mainFrame()->scrollOffset().width);
EXPECT_EQ(84, webViewImpl->mainFrame()->scrollOffset().height);
- webViewImpl->page()->mainFrame()->loader()->history()->saveDocumentAndScrollState();
+ webViewImpl->page()->mainFrame()->loader().history()->saveDocumentAndScrollState();
// Confirm that restoring the page state restores the parameters.
webViewImpl->setPageScaleFactor(1.5f, WebPoint(16, 24));
@@ -730,11 +730,11 @@ TEST_F(WebViewTest, HistoryResetScrollAndScaleState)
// wasScrolledByUser flag on the main frame, and prevent restoreScrollPositionAndViewState
// from restoring the scrolling position.
webViewImpl->page()->mainFrame()->view()->setWasScrolledByUser(false);
- webViewImpl->page()->mainFrame()->loader()->history()->restoreScrollPositionAndViewState();
+ webViewImpl->page()->mainFrame()->loader().history()->restoreScrollPositionAndViewState();
EXPECT_EQ(2.0f, webViewImpl->pageScaleFactor());
EXPECT_EQ(116, webViewImpl->mainFrame()->scrollOffset().width);
EXPECT_EQ(84, webViewImpl->mainFrame()->scrollOffset().height);
- webViewImpl->page()->mainFrame()->loader()->history()->saveDocumentAndScrollState();
+ webViewImpl->page()->mainFrame()->loader().history()->saveDocumentAndScrollState();
// Confirm that resetting the page state resets the saved scroll position.
// The HistoryController treats a page scale factor of 0.0f as special and avoids
@@ -743,7 +743,7 @@ TEST_F(WebViewTest, HistoryResetScrollAndScaleState)
EXPECT_EQ(1.0f, webViewImpl->pageScaleFactor());
EXPECT_EQ(0, webViewImpl->mainFrame()->scrollOffset().width);
EXPECT_EQ(0, webViewImpl->mainFrame()->scrollOffset().height);
- webViewImpl->page()->mainFrame()->loader()->history()->restoreScrollPositionAndViewState();
+ webViewImpl->page()->mainFrame()->loader().history()->restoreScrollPositionAndViewState();
EXPECT_EQ(1.0f, webViewImpl->pageScaleFactor());
EXPECT_EQ(0, webViewImpl->mainFrame()->scrollOffset().width);
EXPECT_EQ(0, webViewImpl->mainFrame()->scrollOffset().height);
@@ -1187,7 +1187,7 @@ TEST_F(WebViewTest, FocusExistingFrameOnNavigate)
WebURLRequest webURLRequest;
webURLRequest.initialize();
WebCore::FrameLoadRequest request(0, webURLRequest.toResourceRequest(), WTF::String("_blank"));
- webViewImpl->page()->mainFrame()->loader()->load(request);
+ webViewImpl->page()->mainFrame()->loader().load(request);
ASSERT_TRUE(client.createdWebView());
EXPECT_FALSE(client.didFocusCalled());
@@ -1195,7 +1195,7 @@ TEST_F(WebViewTest, FocusExistingFrameOnNavigate)
WebURLRequest webURLRequestWithTargetStart;
webURLRequestWithTargetStart.initialize();
WebCore::FrameLoadRequest requestWithTargetStart(0, webURLRequestWithTargetStart.toResourceRequest(), WTF::String("_start"));
- toWebViewImpl(client.createdWebView())->page()->mainFrame()->loader()->load(requestWithTargetStart);
+ toWebViewImpl(client.createdWebView())->page()->mainFrame()->loader().load(requestWithTargetStart);
EXPECT_TRUE(client.didFocusCalled());
m_webViewHelper.reset(); // Remove dependency on locally scoped client.
« no previous file with comments | « Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698