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

Side by Side Diff: content/browser/tab_contents/test_tab_contents.cc

Issue 8983010: Convert WebContents to return a content::NavigationController instead of the implementation. Upda... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/tab_contents/test_tab_contents.h" 5 #include "content/browser/tab_contents/test_tab_contents.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "content/browser/browser_url_handler.h" 9 #include "content/browser/browser_url_handler.h"
10 #include "content/browser/renderer_host/mock_render_process_host.h" 10 #include "content/browser/renderer_host/mock_render_process_host.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 RenderViewHost* render_view_host) { 79 RenderViewHost* render_view_host) {
80 // This will go to a TestRenderViewHost. 80 // This will go to a TestRenderViewHost.
81 render_view_host->CreateRenderView(string16(), -1); 81 render_view_host->CreateRenderView(string16(), -1);
82 return true; 82 return true;
83 } 83 }
84 84
85 TabContents* TestTabContents::Clone() { 85 TabContents* TestTabContents::Clone() {
86 TabContents* tc = new TestTabContents( 86 TabContents* tc = new TestTabContents(
87 GetBrowserContext(), 87 GetBrowserContext(),
88 SiteInstance::CreateSiteInstance(GetBrowserContext())); 88 SiteInstance::CreateSiteInstance(GetBrowserContext()));
89 tc->GetController().CopyStateFrom(controller_); 89 tc->GetControllerImpl().CopyStateFrom(controller_);
90 return tc; 90 return tc;
91 } 91 }
92 92
93 void TestTabContents::NavigateAndCommit(const GURL& url) { 93 void TestTabContents::NavigateAndCommit(const GURL& url) {
94 GetController().LoadURL( 94 GetController().LoadURL(
95 url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); 95 url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string());
96 GURL loaded_url(url); 96 GURL loaded_url(url);
97 bool reverse_on_redirect = false; 97 bool reverse_on_redirect = false;
98 BrowserURLHandler::GetInstance()->RewriteURLIfNecessary( 98 BrowserURLHandler::GetInstance()->RewriteURLIfNecessary(
99 &loaded_url, GetBrowserContext(), &reverse_on_redirect); 99 &loaded_url, GetBrowserContext(), &reverse_on_redirect);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 void TestTabContents::SetHistoryLengthAndPrune( 155 void TestTabContents::SetHistoryLengthAndPrune(
156 const SiteInstance* site_instance, int history_length, int32 min_page_id) { 156 const SiteInstance* site_instance, int history_length, int32 min_page_id) {
157 EXPECT_TRUE(expect_set_history_length_and_prune_); 157 EXPECT_TRUE(expect_set_history_length_and_prune_);
158 expect_set_history_length_and_prune_ = false; 158 expect_set_history_length_and_prune_ = false;
159 EXPECT_EQ(expect_set_history_length_and_prune_site_instance_, site_instance); 159 EXPECT_EQ(expect_set_history_length_and_prune_site_instance_, site_instance);
160 EXPECT_EQ(expect_set_history_length_and_prune_history_length_, 160 EXPECT_EQ(expect_set_history_length_and_prune_history_length_,
161 history_length); 161 history_length);
162 EXPECT_EQ(expect_set_history_length_and_prune_min_page_id_, min_page_id); 162 EXPECT_EQ(expect_set_history_length_and_prune_min_page_id_, min_page_id);
163 } 163 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698