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

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

Issue 10698068: chrome: Put browser_navigator.h into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: already in chrome namespace Created 8 years, 5 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) 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 "chrome/test/base/browser_with_test_window_test.h" 5 #include "chrome/test/base/browser_with_test_window_test.h"
6 6
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "chrome/browser/profiles/profile_destroyer.h" 8 #include "chrome/browser/profiles/profile_destroyer.h"
9 #include "chrome/browser/ui/browser_navigator.h" 9 #include "chrome/browser/ui/browser_navigator.h"
10 #include "chrome/browser/ui/browser_tabstrip.h" 10 #include "chrome/browser/ui/browser_tabstrip.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 void BrowserWithTestWindowTest::set_profile(TestingProfile* profile) { 76 void BrowserWithTestWindowTest::set_profile(TestingProfile* profile) {
77 if (profile_.get() != NULL) 77 if (profile_.get() != NULL)
78 ProfileDestroyer::DestroyProfileWhenAppropriate(profile_.release()); 78 ProfileDestroyer::DestroyProfileWhenAppropriate(profile_.release());
79 79
80 profile_.reset(profile); 80 profile_.reset(profile);
81 } 81 }
82 82
83 void BrowserWithTestWindowTest::AddTab(Browser* browser, const GURL& url) { 83 void BrowserWithTestWindowTest::AddTab(Browser* browser, const GURL& url) {
84 browser::NavigateParams params(browser, url, content::PAGE_TRANSITION_TYPED); 84 chrome::NavigateParams params(browser, url, content::PAGE_TRANSITION_TYPED);
85 params.tabstrip_index = 0; 85 params.tabstrip_index = 0;
86 params.disposition = NEW_FOREGROUND_TAB; 86 params.disposition = NEW_FOREGROUND_TAB;
87 browser::Navigate(&params); 87 chrome::Navigate(&params);
88 CommitPendingLoad(&params.target_contents->web_contents()->GetController()); 88 CommitPendingLoad(&params.target_contents->web_contents()->GetController());
89 } 89 }
90 90
91 void BrowserWithTestWindowTest::CommitPendingLoad( 91 void BrowserWithTestWindowTest::CommitPendingLoad(
92 NavigationController* controller) { 92 NavigationController* controller) {
93 if (!controller->GetPendingEntry()) 93 if (!controller->GetPendingEntry())
94 return; // Nothing to commit. 94 return; // Nothing to commit.
95 95
96 RenderViewHost* old_rvh = 96 RenderViewHost* old_rvh =
97 controller->GetWebContents()->GetRenderViewHost(); 97 controller->GetWebContents()->GetRenderViewHost();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // Destroy the profile here - otherwise, if the profile is freed in the 153 // Destroy the profile here - otherwise, if the profile is freed in the
154 // destructor, and a test subclass owns a resource that the profile depends 154 // destructor, and a test subclass owns a resource that the profile depends
155 // on (such as g_browser_process()->local_state()) there's no way for the 155 // on (such as g_browser_process()->local_state()) there's no way for the
156 // subclass to free it after the profile. 156 // subclass to free it after the profile.
157 profile_.reset(NULL); 157 profile_.reset(NULL);
158 } 158 }
159 159
160 TestingProfile* BrowserWithTestWindowTest::CreateProfile() { 160 TestingProfile* BrowserWithTestWindowTest::CreateProfile() {
161 return new TestingProfile(); 161 return new TestingProfile();
162 } 162 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/web_ui_browsertest.cc ('k') | chrome/test/base/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698