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

Side by Side Diff: content/public/test/test_renderer_host.cc

Issue 1136553005: Revert of Classify navigations without page id in parallel to the existing classifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « content/public/test/test_renderer_host.h ('k') | content/public/test/web_contents_tester.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/public/test/test_renderer_host.h" 5 #include "content/public/test/test_renderer_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "content/browser/frame_host/navigation_entry_impl.h" 9 #include "content/browser/frame_host/navigation_entry_impl.h"
10 #include "content/browser/renderer_host/render_view_host_factory.h" 10 #include "content/browser/renderer_host/render_view_host_factory.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 157
158 void RenderViewHostTestHarness::NavigateAndCommit(const GURL& url) { 158 void RenderViewHostTestHarness::NavigateAndCommit(const GURL& url) {
159 static_cast<TestWebContents*>(web_contents())->NavigateAndCommit(url); 159 static_cast<TestWebContents*>(web_contents())->NavigateAndCommit(url);
160 } 160 }
161 161
162 void RenderViewHostTestHarness::Reload() { 162 void RenderViewHostTestHarness::Reload() {
163 NavigationEntry* entry = controller().GetLastCommittedEntry(); 163 NavigationEntry* entry = controller().GetLastCommittedEntry();
164 DCHECK(entry); 164 DCHECK(entry);
165 controller().Reload(false); 165 controller().Reload(false);
166 RenderFrameHostTester::For(main_rfh()) 166 RenderFrameHostTester::For(main_rfh())->SendNavigateWithTransition(
167 ->SendNavigateWithTransition(entry->GetPageID(), entry->GetUniqueID(), 167 entry->GetPageID(), entry->GetURL(), ui::PAGE_TRANSITION_RELOAD);
168 false, entry->GetURL(),
169 ui::PAGE_TRANSITION_RELOAD);
170 } 168 }
171 169
172 void RenderViewHostTestHarness::FailedReload() { 170 void RenderViewHostTestHarness::FailedReload() {
173 NavigationEntry* entry = controller().GetLastCommittedEntry(); 171 NavigationEntry* entry = controller().GetLastCommittedEntry();
174 DCHECK(entry); 172 DCHECK(entry);
175 controller().Reload(false); 173 controller().Reload(false);
176 RenderFrameHostTester::For(main_rfh()) 174 RenderFrameHostTester::For(main_rfh())->SendFailedNavigate(entry->GetPageID(),
177 ->SendFailedNavigate(entry->GetPageID(), entry->GetUniqueID(), false, 175 entry->GetURL());
178 entry->GetURL());
179 } 176 }
180 177
181 void RenderViewHostTestHarness::SetUp() { 178 void RenderViewHostTestHarness::SetUp() {
182 thread_bundle_.reset(new TestBrowserThreadBundle(thread_bundle_options_)); 179 thread_bundle_.reset(new TestBrowserThreadBundle(thread_bundle_options_));
183 180
184 #if defined(OS_WIN) 181 #if defined(OS_WIN)
185 ole_initializer_.reset(new ui::ScopedOleInitializer()); 182 ole_initializer_.reset(new ui::ScopedOleInitializer());
186 #endif 183 #endif
187 #if defined(USE_AURA) 184 #if defined(USE_AURA)
188 // The ContextFactory must exist before any Compositors are created. 185 // The ContextFactory must exist before any Compositors are created.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() { 242 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() {
246 return new TestBrowserContext(); 243 return new TestBrowserContext();
247 } 244 }
248 245
249 void RenderViewHostTestHarness::SetRenderProcessHostFactory( 246 void RenderViewHostTestHarness::SetRenderProcessHostFactory(
250 RenderProcessHostFactory* factory) { 247 RenderProcessHostFactory* factory) {
251 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); 248 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory);
252 } 249 }
253 250
254 } // namespace content 251 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_renderer_host.h ('k') | content/public/test/web_contents_tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698