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

Unified Diff: content/browser/web_contents/navigation_controller_impl_unittest.cc

Issue 23978003: Delete unneeded pending entries in DidFailProvisionalLoad to prevent a spoof. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only clear the pending entry, not the transient. Created 7 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
Index: content/browser/web_contents/navigation_controller_impl_unittest.cc
diff --git a/content/browser/web_contents/navigation_controller_impl_unittest.cc b/content/browser/web_contents/navigation_controller_impl_unittest.cc
index 7a0b03b2bf06d7f09b1feb1144aae0701201b645..df6a47c1b133dd105dcdfed095164c93f7c4524f 100644
--- a/content/browser/web_contents/navigation_controller_impl_unittest.cc
+++ b/content/browser/web_contents/navigation_controller_impl_unittest.cc
@@ -1008,10 +1008,10 @@ TEST_F(NavigationControllerTest, LoadURL_RedirectAbortDoesntShowPendingURL) {
ViewHostMsg_DidFailProvisionalLoadWithError(0, // routing_id
params));
- // This should not clear the pending entry or notify of a navigation state
- // change.
+ // Because the pending entry is renderer initiated and not visible, we
+ // clear it when it fails.
EXPECT_EQ(-1, controller.GetPendingEntryIndex());
- EXPECT_TRUE(controller.GetPendingEntry());
+ EXPECT_FALSE(controller.GetPendingEntry());
EXPECT_EQ(0, controller.GetLastCommittedEntryIndex());
EXPECT_EQ(0, delegate->navigation_state_change_count());
« no previous file with comments | « content/browser/web_contents/navigation_controller_impl.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698