Index: content/test/test_web_contents.cc |
diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc |
index 6a2e05e2b9cc805bcd8109b20f72f186841f8c35..328c82f80c0e2a8fd4802f60d45512f9421bf4ef 100644 |
--- a/content/test/test_web_contents.cc |
+++ b/content/test/test_web_contents.cc |
@@ -141,19 +141,18 @@ void TestWebContents::TestSetIsLoading(bool value) { |
} |
void TestWebContents::CommitPendingNavigation() { |
- // If we are doing a cross-site navigation, this simulates the current RFH |
- // notifying that it has unloaded so the pending RFH is resumed and can |
- // navigate. |
- TestRenderFrameHost* old_rfh = GetMainFrame(); |
const NavigationEntry* entry = GetController().GetPendingEntry(); |
DCHECK(entry); |
- // Simulate the BeforeUnload ACK if necessary. |
+ // If we are doing a cross-site navigation, this simulates the current RFH |
+ // notifying that it has unloaded so the pending RFH is resumed and can |
+ // navigate. |
// PlzNavigate: the pending RFH is not created before the navigation commit, |
// so it is necessary to simulate the IO thread response here to commit in the |
// proper renderer. |
- old_rfh->PrepareForCommit(entry->GetURL()); |
+ GetMainFrame()->PrepareForCommit(entry->GetURL()); |
clamy
2015/01/13 12:41:59
There is exactly the same problem of the webui RFH
nasko
2015/01/17 00:22:01
Acknowledged.
|
+ TestRenderFrameHost* old_rfh = GetMainFrame(); |
TestRenderFrameHost* rfh = GetPendingMainFrame(); |
if (!rfh) |
rfh = old_rfh; |