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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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
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 "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 #elif defined(TOOLKIT_VIEWS) 110 #elif defined(TOOLKIT_VIEWS)
111 return views_test_helper_->GetContext(); 111 return views_test_helper_->GetContext();
112 #else 112 #else
113 return nullptr; 113 return nullptr;
114 #endif 114 #endif
115 } 115 }
116 116
117 void BrowserWithTestWindowTest::AddTab(Browser* browser, const GURL& url) { 117 void BrowserWithTestWindowTest::AddTab(Browser* browser, const GURL& url) {
118 chrome::NavigateParams params(browser, url, ui::PAGE_TRANSITION_TYPED); 118 chrome::NavigateParams params(browser, url, ui::PAGE_TRANSITION_TYPED);
119 params.tabstrip_index = 0; 119 params.tabstrip_index = 0;
120 params.disposition = NEW_FOREGROUND_TAB; 120 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB;
121 chrome::Navigate(&params); 121 chrome::Navigate(&params);
122 CommitPendingLoad(&params.target_contents->GetController()); 122 CommitPendingLoad(&params.target_contents->GetController());
123 } 123 }
124 124
125 void BrowserWithTestWindowTest::CommitPendingLoad( 125 void BrowserWithTestWindowTest::CommitPendingLoad(
126 NavigationController* controller) { 126 NavigationController* controller) {
127 if (!controller->GetPendingEntry()) 127 if (!controller->GetPendingEntry())
128 return; // Nothing to commit. 128 return; // Nothing to commit.
129 129
130 RenderFrameHost* old_rfh = controller->GetWebContents()->GetMainFrame(); 130 RenderFrameHost* old_rfh = controller->GetWebContents()->GetMainFrame();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 Browser::CreateParams params(profile); 229 Browser::CreateParams params(profile);
230 if (hosted_app) { 230 if (hosted_app) {
231 params = Browser::CreateParams::CreateForApp( 231 params = Browser::CreateParams::CreateForApp(
232 "Test", true /* trusted_source */, gfx::Rect(), profile); 232 "Test", true /* trusted_source */, gfx::Rect(), profile);
233 } else { 233 } else {
234 params.type = browser_type; 234 params.type = browser_type;
235 } 235 }
236 params.window = browser_window; 236 params.window = browser_window;
237 return new Browser(params); 237 return new Browser(params);
238 } 238 }
OLDNEW
« no previous file with comments | « chrome/test/base/browser_with_test_window_test.h ('k') | chrome/test/base/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698