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 ff73239e13a3af1036a5507367388b41d16d3d2f..13d5bf40f4bb591955e7e1e8f49f46946d783909 100644 |
--- a/content/browser/frame_host/navigation_controller_impl_unittest.cc |
+++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc |
@@ -2824,6 +2824,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); |