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

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

Issue 28983004: Split the frame tree logic out of HistoryItem (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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') | public/web/WebHistoryItem.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 90408150d37e27ed7d3a9e6ec42d253cd2c734c9..59e4d9d7fb7b834c1ef7c3664a48f4b64ca38409 100644
--- a/Source/web/tests/WebViewTest.cpp
+++ b/Source/web/tests/WebViewTest.cpp
@@ -729,7 +729,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()->history()->saveDocumentAndScrollState(webViewImpl->page()->mainFrame());
// Confirm that restoring the page state restores the parameters.
webViewImpl->setPageScaleFactor(1.5f, WebPoint(16, 24));
@@ -740,11 +740,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()->history()->restoreScrollPositionAndViewState(webViewImpl->page()->mainFrame());
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()->history()->saveDocumentAndScrollState(webViewImpl->page()->mainFrame());
// 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
@@ -753,7 +753,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()->history()->restoreScrollPositionAndViewState(webViewImpl->page()->mainFrame());
EXPECT_EQ(1.0f, webViewImpl->pageScaleFactor());
EXPECT_EQ(0, webViewImpl->mainFrame()->scrollOffset().width);
EXPECT_EQ(0, webViewImpl->mainFrame()->scrollOffset().height);
« no previous file with comments | « Source/web/tests/WebFrameTest.cpp ('k') | public/web/WebHistoryItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698