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

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

Issue 575203002: Use entry URLs instead of entry IDs to determine when to dismiss the overscroll overlay. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: "Check entry's URL in DoesEntryMatchURL for the sake of uni tests. Also fixing a nit. Created 6 years, 3 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 | « content/browser/web_contents/aura/overscroll_navigation_overlay.cc ('k') | 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 3f56f338064ead260e3230c6e2d29603a2862567..895b47ba3d7b2686c56bd8f81035fe9696a554e1 100644
--- a/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc
+++ b/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc
@@ -157,7 +157,7 @@ TEST_F(OverscrollNavigationOverlayTest, MultiNavigation_PaintUpdate) {
EXPECT_FALSE(GetOverlay()->received_paint_update_);
ReceivePaintUpdate();
- // Paint updates until the navigation is committed represent updates
+ // Paint updates until the navigation is committed typically represent updates
// for the previous page, so they shouldn't affect the flag.
EXPECT_FALSE(GetOverlay()->received_paint_update_);
@@ -179,17 +179,13 @@ TEST_F(OverscrollNavigationOverlayTest, MultiNavigation_LoadingUpdate) {
// Navigation was started, so the loading status flag should be reset.
EXPECT_FALSE(GetOverlay()->loading_complete_);
- // Load updates until the navigation is committed represent updates for the
- // previous page, so they shouldn't affect the flag.
+ // DidStopLoading for any navigation should always reset the load flag and
+ // dismiss the overlay even if the pending navigation wasn't committed -
+ // this is a "safety net" in case we mis-identify the destination webpage
+ // (which can happen if a new navigation is performed while while a GestureNav
+ // navigation is in progress).
contents()->TestSetIsLoading(true);
contents()->TestSetIsLoading(false);
- EXPECT_FALSE(GetOverlay()->loading_complete_);
-
- contents()->CommitPendingNavigation();
- contents()->TestSetIsLoading(true);
- contents()->TestSetIsLoading(false);
- // Navigation was committed and the load update was received - the flag
- // should now be updated.
EXPECT_TRUE(GetOverlay()->loading_complete_);
EXPECT_FALSE(GetOverlay()->web_contents());
« no previous file with comments | « content/browser/web_contents/aura/overscroll_navigation_overlay.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698