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

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

Issue 1002803002: Classify navigations without page id in parallel to the existing classifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: relax the dcheck 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())->SendNavigateWithTransition( 166 RenderFrameHostTester::For(main_rfh())
167 entry->GetPageID(), entry->GetURL(), ui::PAGE_TRANSITION_RELOAD); 167 ->SendNavigateWithTransition(entry->GetPageID(), entry->GetUniqueID(),
168 false, entry->GetURL(),
169 ui::PAGE_TRANSITION_RELOAD);
168 } 170 }
169 171
170 void RenderViewHostTestHarness::FailedReload() { 172 void RenderViewHostTestHarness::FailedReload() {
171 NavigationEntry* entry = controller().GetLastCommittedEntry(); 173 NavigationEntry* entry = controller().GetLastCommittedEntry();
172 DCHECK(entry); 174 DCHECK(entry);
173 controller().Reload(false); 175 controller().Reload(false);
174 RenderFrameHostTester::For(main_rfh())->SendFailedNavigate(entry->GetPageID(), 176 RenderFrameHostTester::For(main_rfh())
175 entry->GetURL()); 177 ->SendFailedNavigate(entry->GetPageID(), entry->GetUniqueID(), false,
178 entry->GetURL());
176 } 179 }
177 180
178 void RenderViewHostTestHarness::SetUp() { 181 void RenderViewHostTestHarness::SetUp() {
179 thread_bundle_.reset(new TestBrowserThreadBundle(thread_bundle_options_)); 182 thread_bundle_.reset(new TestBrowserThreadBundle(thread_bundle_options_));
180 183
181 #if defined(OS_WIN) 184 #if defined(OS_WIN)
182 ole_initializer_.reset(new ui::ScopedOleInitializer()); 185 ole_initializer_.reset(new ui::ScopedOleInitializer());
183 #endif 186 #endif
184 #if defined(USE_AURA) 187 #if defined(USE_AURA)
185 // The ContextFactory must exist before any Compositors are created. 188 // The ContextFactory must exist before any Compositors are created.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() { 245 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() {
243 return new TestBrowserContext(); 246 return new TestBrowserContext();
244 } 247 }
245 248
246 void RenderViewHostTestHarness::SetRenderProcessHostFactory( 249 void RenderViewHostTestHarness::SetRenderProcessHostFactory(
247 RenderProcessHostFactory* factory) { 250 RenderProcessHostFactory* factory) {
248 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); 251 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory);
249 } 252 }
250 253
251 } // namespace content 254 } // 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