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

Side by Side Diff: content/browser/renderer_host/test_render_view_host.cc

Issue 9564023: Revert 124461 - Remove the singleton instance get/delete methods from RootWindow (yay) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « content/browser/renderer_host/test_render_view_host.h ('k') | ui/aura/demo/demo_main.cc » ('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/browser/browser_url_handler.h" 5 #include "content/browser/browser_url_handler.h"
6 #include "content/browser/renderer_host/test_backing_store.h" 6 #include "content/browser/renderer_host/test_backing_store.h"
7 #include "content/browser/renderer_host/test_render_view_host.h" 7 #include "content/browser/renderer_host/test_render_view_host.h"
8 #include "content/browser/site_instance_impl.h" 8 #include "content/browser/site_instance_impl.h"
9 #include "content/browser/tab_contents/navigation_controller_impl.h" 9 #include "content/browser/tab_contents/navigation_controller_impl.h"
10 #include "content/browser/tab_contents/navigation_entry_impl.h" 10 #include "content/browser/tab_contents/navigation_entry_impl.h"
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 393
394 void RenderViewHostTestHarness::Reload() { 394 void RenderViewHostTestHarness::Reload() {
395 NavigationEntry* entry = controller().GetLastCommittedEntry(); 395 NavigationEntry* entry = controller().GetLastCommittedEntry();
396 DCHECK(entry); 396 DCHECK(entry);
397 controller().Reload(false); 397 controller().Reload(false);
398 rvh()->SendNavigate(entry->GetPageID(), entry->GetURL()); 398 rvh()->SendNavigate(entry->GetPageID(), entry->GetURL());
399 } 399 }
400 400
401 void RenderViewHostTestHarness::SetUp() { 401 void RenderViewHostTestHarness::SetUp() {
402 #if defined(USE_AURA) 402 #if defined(USE_AURA)
403 root_window_.reset(new aura::RootWindow); 403 aura::RootWindow* root_window = aura::RootWindow::GetInstance();
404 test_stacking_client_.reset( 404 test_stacking_client_.reset(new aura::test::TestStackingClient(root_window));
405 new aura::test::TestStackingClient(root_window_.get()));
406 #endif 405 #endif
407 SetContents(CreateTestTabContents()); 406 SetContents(CreateTestTabContents());
408 } 407 }
409 408
410 void RenderViewHostTestHarness::TearDown() { 409 void RenderViewHostTestHarness::TearDown() {
411 SetContents(NULL); 410 SetContents(NULL);
412 #if defined(USE_AURA) 411 #if defined(USE_AURA)
413 test_stacking_client_.reset(); 412 test_stacking_client_.reset();
414 root_window_.reset();
415 #endif 413 #endif
416 414
417 // Make sure that we flush any messages related to TabContents destruction 415 // Make sure that we flush any messages related to TabContents destruction
418 // before we destroy the browser context. 416 // before we destroy the browser context.
419 MessageLoop::current()->RunAllPending(); 417 MessageLoop::current()->RunAllPending();
420 418
421 // Release the browser context on the UI thread. 419 // Release the browser context on the UI thread.
422 message_loop_.DeleteSoon(FROM_HERE, browser_context_.release()); 420 message_loop_.DeleteSoon(FROM_HERE, browser_context_.release());
423 message_loop_.RunAllPending(); 421 message_loop_.RunAllPending();
424 } 422 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/test_render_view_host.h ('k') | ui/aura/demo/demo_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698