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

Unified Diff: content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc

Issue 1088933003: PlzNavigate: use the right helper functions in OverscrollNavigationOverlayTests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc
diff --git a/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc b/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc
index 3182ca579fd46cec8e0bd1a6e056e6736f800b91..4eda449e57f2587099b6f39f0656ef3958da3b7d 100644
--- a/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc
+++ b/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc
@@ -101,6 +101,7 @@ class OverscrollNavigationOverlayTest : public RenderViewHostImplTestHarness {
// Performs BACK navigation, sets image from layer_delegate_ on
// image_delegate_.
GetOverlay()->OnOverscrollCompleting();
+ main_test_rfh()->PrepareForCommit();
if (window) {
EXPECT_TRUE(contents()->cross_navigation_pending());
EXPECT_EQ(GetOverlay()->direction_, OverscrollNavigationOverlay::BACK);
@@ -252,7 +253,8 @@ TEST_F(OverscrollNavigationOverlayTest, CancelAfterSuccessfulNavigation) {
EXPECT_EQ(GetOverlay()->direction_, OverscrollNavigationOverlay::NONE);
EXPECT_TRUE(contents()->cross_navigation_pending());
- contents()->CommitPendingNavigation();
+ main_test_rfh()->SendNavigate(
nasko 2015/04/14 16:13:35 nit: I kinda like the CommitPendingNavigation para
+ 1, contents()->GetController().GetPendingEntry()->GetURL());
EXPECT_EQ(contents()->GetURL(), third());
}
@@ -266,7 +268,8 @@ TEST_F(OverscrollNavigationOverlayTest, Navigation_PaintUpdate) {
// for the previous page, so we should still be observing.
EXPECT_TRUE(GetOverlay()->web_contents());
- contents()->CommitPendingNavigation();
+ main_test_rfh()->SendNavigate(
+ 1, contents()->GetController().GetPendingEntry()->GetURL());
ReceivePaintUpdate();
// Navigation was committed and the paint update was received - we should no
@@ -288,7 +291,8 @@ TEST_F(OverscrollNavigationOverlayTest, Navigation_LoadingUpdate) {
contents()->TestSetIsLoading(true);
contents()->TestSetIsLoading(false);
EXPECT_FALSE(GetOverlay()->web_contents());
- contents()->CommitPendingNavigation();
+ main_test_rfh()->SendNavigate(
+ 1, contents()->GetController().GetPendingEntry()->GetURL());
EXPECT_EQ(contents()->GetURL(), third());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698