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

Side by Side Diff: chrome/browser/renderer_host/test/test_render_view_host.cc

Issue 6532034: GTTF: Use a fresh TestingBrowserProcess for each test, part #2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/test/test_render_view_host.h" 5 #include "chrome/browser/renderer_host/test/test_render_view_host.h"
6 6
7 #include "chrome/browser/browser_url_handler.h" 7 #include "chrome/browser/browser_url_handler.h"
8 #include "chrome/browser/renderer_host/site_instance.h" 8 #include "chrome/browser/renderer_host/site_instance.h"
9 #include "chrome/browser/renderer_host/test/test_backing_store.h" 9 #include "chrome/browser/renderer_host/test/test_backing_store.h"
10 #include "chrome/browser/tab_contents/navigation_controller.h" 10 #include "chrome/browser/tab_contents/navigation_controller.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 } 321 }
322 322
323 void RenderViewHostTestHarness::Reload() { 323 void RenderViewHostTestHarness::Reload() {
324 NavigationEntry* entry = controller().GetLastCommittedEntry(); 324 NavigationEntry* entry = controller().GetLastCommittedEntry();
325 DCHECK(entry); 325 DCHECK(entry);
326 controller().Reload(false); 326 controller().Reload(false);
327 rvh()->SendNavigate(entry->page_id(), entry->url()); 327 rvh()->SendNavigate(entry->page_id(), entry->url());
328 } 328 }
329 329
330 void RenderViewHostTestHarness::SetUp() { 330 void RenderViewHostTestHarness::SetUp() {
331 TestingBrowserProcessTest::SetUp();
332
331 contents_.reset(CreateTestTabContents()); 333 contents_.reset(CreateTestTabContents());
332 } 334 }
333 335
334 void RenderViewHostTestHarness::TearDown() { 336 void RenderViewHostTestHarness::TearDown() {
335 contents_.reset(); 337 contents_.reset();
336 338
337 // Make sure that we flush any messages related to TabContents destruction 339 // Make sure that we flush any messages related to TabContents destruction
338 // before we destroy the profile. 340 // before we destroy the profile.
339 MessageLoop::current()->RunAllPending(); 341 MessageLoop::current()->RunAllPending();
340 342
341 // Release the profile on the UI thread. 343 // Release the profile on the UI thread.
342 message_loop_.DeleteSoon(FROM_HERE, profile_.release()); 344 message_loop_.DeleteSoon(FROM_HERE, profile_.release());
343 message_loop_.RunAllPending(); 345 message_loop_.RunAllPending();
346
347 TestingBrowserProcessTest::TearDown();
344 } 348 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698