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

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

Issue 311783005: Fix crash in NavigationControllerImpl::RendererDidNavigateToNewPage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/frame_host/navigation_controller_impl.cc ('k') | 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_unittest.cc
diff --git a/content/browser/frame_host/navigation_controller_impl_unittest.cc b/content/browser/frame_host/navigation_controller_impl_unittest.cc
index 603fac5bcfda95240e3d7a3f3cf32d4af178d8b8..9bde501b34a476eab119482b056730bd3d42c430 100644
--- a/content/browser/frame_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc
@@ -2261,6 +2261,19 @@ TEST_F(NavigationControllerTest, ClientRedirectAfterInPageNavigation) {
}
}
+TEST_F(NavigationControllerTest, PushStateWithoutPreviousEntry)
+{
+ ASSERT_FALSE(controller_impl().GetLastCommittedEntry());
+ FrameHostMsg_DidCommitProvisionalLoad_Params params;
+ GURL url("http://foo");
+ params.page_id = 1;
+ params.url = url;
+ params.page_state = PageState::CreateFromURL(url);
+ params.was_within_same_page = true;
+ test_rvh()->SendNavigateWithParams(&params);
+ // We pass if we don't crash.
+}
+
// NotificationObserver implementation used in verifying we've received the
// NOTIFICATION_NAV_LIST_PRUNED method.
class PrunedListener : public NotificationObserver {
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698