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

Side by Side Diff: chrome/test/base/browser_with_test_window_test.cc

Issue 8892011: Clean up TCW, make it solely a hub for 1:1 observer/helper objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 "chrome/test/base/browser_with_test_window_test.h" 5 #include "chrome/test/base/browser_with_test_window_test.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <ole2.h> 8 #include <ole2.h>
9 #endif // defined(OS_WIN) 9 #endif // defined(OS_WIN)
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 TabContents* tab_contents) { 57 TabContents* tab_contents) {
58 return static_cast<TestRenderViewHost*>( 58 return static_cast<TestRenderViewHost*>(
59 tab_contents->render_view_host()); 59 tab_contents->render_view_host());
60 } 60 }
61 61
62 void BrowserWithTestWindowTest::AddTab(Browser* browser, const GURL& url) { 62 void BrowserWithTestWindowTest::AddTab(Browser* browser, const GURL& url) {
63 browser::NavigateParams params(browser, url, content::PAGE_TRANSITION_TYPED); 63 browser::NavigateParams params(browser, url, content::PAGE_TRANSITION_TYPED);
64 params.tabstrip_index = 0; 64 params.tabstrip_index = 0;
65 params.disposition = NEW_FOREGROUND_TAB; 65 params.disposition = NEW_FOREGROUND_TAB;
66 browser::Navigate(&params); 66 browser::Navigate(&params);
67 CommitPendingLoad(&params.target_contents->controller()); 67 CommitPendingLoad(&params.target_contents->tab_contents()->controller());
68 } 68 }
69 69
70 void BrowserWithTestWindowTest::CommitPendingLoad( 70 void BrowserWithTestWindowTest::CommitPendingLoad(
71 NavigationController* controller) { 71 NavigationController* controller) {
72 if (!controller->pending_entry()) 72 if (!controller->pending_entry())
73 return; // Nothing to commit. 73 return; // Nothing to commit.
74 74
75 TestRenderViewHost* old_rvh = 75 TestRenderViewHost* old_rvh =
76 TestRenderViewHostForTab(controller->tab_contents()); 76 TestRenderViewHostForTab(controller->tab_contents());
77 MockRenderProcessHost* mock_rph = static_cast<MockRenderProcessHost*>( 77 MockRenderProcessHost* mock_rph = static_cast<MockRenderProcessHost*>(
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // Make sure we close all tabs, otherwise Browser isn't happy in its 130 // Make sure we close all tabs, otherwise Browser isn't happy in its
131 // destructor. 131 // destructor.
132 browser()->CloseAllTabs(); 132 browser()->CloseAllTabs();
133 browser_.reset(NULL); 133 browser_.reset(NULL);
134 window_.reset(NULL); 134 window_.reset(NULL);
135 } 135 }
136 136
137 TestingProfile* BrowserWithTestWindowTest::CreateProfile() { 137 TestingProfile* BrowserWithTestWindowTest::CreateProfile() {
138 return new TestingProfile(); 138 return new TestingProfile();
139 } 139 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/web_ui_browsertest.cc ('k') | chrome/test/base/test_tab_strip_model_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698