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

Unified Diff: content/test/test_web_contents.cc

Issue 789643005: PlzNavigate: make content unit tests work with browser side navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cancel-navigations
Patch Set: Created 5 years, 11 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
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;

Powered by Google App Engine
This is Rietveld 408576698