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

Unified Diff: content/browser/frame_host/navigation_controller_impl_browsertest.cc

Issue 1867413002: Fix the replaceState-while-pending tests to check to see that the pending entry isn't affected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/frame_host/navigation_controller_impl_browsertest.cc
diff --git a/content/browser/frame_host/navigation_controller_impl_browsertest.cc b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
index cf9c8c79ecf8fda878cea954f280ea01daf508e6..1f2b243521c9e689157a668219e7c809c356169a 100644
--- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
@@ -2912,9 +2912,9 @@ void DoReplaceStateWhilePending(Shell* shell,
stalled_url, Referrer(), ui::PAGE_TRANSITION_LINK, std::string());
// That should be the pending entry.
- NavigationEntryImpl* entry = controller.GetPendingEntry();
- ASSERT_NE(nullptr, entry);
- EXPECT_EQ(stalled_url, entry->GetURL());
+ NavigationEntryImpl* original_pending_entry = controller.GetPendingEntry();
+ ASSERT_NE(nullptr, original_pending_entry);
+ EXPECT_EQ(stalled_url, original_pending_entry->GetURL());
{
// Now the existing page uses history.replaceState().
@@ -2929,6 +2929,10 @@ void DoReplaceStateWhilePending(Shell* shell,
// classification.
EXPECT_EQ(NAVIGATION_TYPE_EXISTING_PAGE, capturer.details().type);
EXPECT_TRUE(capturer.details().is_in_page);
+
+ // That should not have affected the pending entry.
+ NavigationEntryImpl* pending_entry = controller.GetPendingEntry();
+ EXPECT_EQ(original_pending_entry, pending_entry);
}
ResourceDispatcherHost::Get()->SetDelegate(nullptr);
« 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