| Index: chrome/browser/tab_contents/test_tab_contents.cc
|
| ===================================================================
|
| --- chrome/browser/tab_contents/test_tab_contents.cc (revision 60964)
|
| +++ chrome/browser/tab_contents/test_tab_contents.cc (working copy)
|
| @@ -45,7 +45,7 @@
|
| }
|
| }
|
|
|
| -TestRenderViewHost* TestTabContents::pending_rvh() const {
|
| +TestRenderViewHost* TestTabContents::pending_rvh() {
|
| return static_cast<TestRenderViewHost*>(
|
| render_manager_.pending_render_view_host_);
|
| }
|
| @@ -70,34 +70,7 @@
|
| bool reverse_on_redirect = false;
|
| BrowserURLHandler::RewriteURLIfNecessary(
|
| &loaded_url, profile(), &reverse_on_redirect);
|
| -
|
| - // LoadURL created a navigation entry, now simulate the RenderView sending
|
| - // a notification that it actually navigated.
|
| - CommitPendingNavigation();
|
| + static_cast<TestRenderViewHost*>(render_view_host())->SendNavigate(
|
| + static_cast<MockRenderProcessHost*>(render_view_host()->process())->
|
| + max_page_id() + 1, loaded_url);
|
| }
|
| -
|
| -void TestTabContents::CommitPendingNavigation() {
|
| - // If we are doing a cross-site navigation, this simulates the current RVH
|
| - // notifying that it has unloaded so the pending RVH is resumed and can
|
| - // navigate.
|
| - ProceedWithCrossSiteNavigation();
|
| - TestRenderViewHost* rvh = pending_rvh();
|
| - if (!rvh)
|
| - rvh = static_cast<TestRenderViewHost*>(render_manager_.current_host());
|
| -
|
| - const NavigationEntry* entry = controller().pending_entry();
|
| - DCHECK(entry);
|
| - int page_id = entry->page_id();
|
| - if (page_id == -1) {
|
| - // It's a new navigation, assign a never-seen page id to it.
|
| - page_id =
|
| - static_cast<MockRenderProcessHost*>(rvh->process())->max_page_id() + 1;
|
| - }
|
| - rvh->SendNavigate(page_id, entry->url());
|
| -}
|
| -
|
| -void TestTabContents::ProceedWithCrossSiteNavigation() {
|
| - if (!pending_rvh())
|
| - return;
|
| - render_manager_.ShouldClosePage(true, true);
|
| -}
|
|
|