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 a1ee050eb9dc4700a654341c0a54499ed850caad..124e59e1f143d0b7117b0f2fa3d929cc6bd2dc56 100644 |
--- a/content/browser/frame_host/navigation_controller_impl_unittest.cc |
+++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc |
@@ -2822,6 +2822,10 @@ TEST_F(NavigationControllerTest, RestoreNavigateAfterFailure) { |
0, NavigationController::RESTORE_LAST_SESSION_EXITED_CLEANLY, &entries); |
ASSERT_EQ(0u, entries.size()); |
+ // Ensure the RenderFrame is initialized before simulating events coming from |
+ // it. |
+ main_test_rfh()->InitializeRenderFrameIfNeeded(); |
+ |
// Before navigating to the restored entry, it should have a restore_type |
// and no SiteInstance. |
entry = our_controller.GetEntryAtIndex(0); |
@@ -3250,6 +3254,8 @@ TEST_F(NavigationControllerTest, RendererInitiatedPendingEntries) { |
// We create pending entries for renderer-initiated navigations so that we |
// can show them in new tabs when it is safe. |
+ main_test_rfh()->SendRendererInitiatedNavigationRequest(url1, false); |
+ main_test_rfh()->PrepareForCommit(); |
navigator->DidStartProvisionalLoad(main_test_rfh(), url1); |
// Simulate what happens if a BrowserURLHandler rewrites the URL, causing |