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

Side by Side Diff: chrome/browser/ui/settings_window_manager_browsertest.cc

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui/settings_window_manager.h" 5 #include "chrome/browser/ui/settings_window_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 public: 52 public:
53 SettingsWindowManagerTest() 53 SettingsWindowManagerTest()
54 : settings_manager_(chrome::SettingsWindowManager::GetInstance()), 54 : settings_manager_(chrome::SettingsWindowManager::GetInstance()),
55 test_profile_(NULL) { 55 test_profile_(NULL) {
56 settings_manager_->AddObserver(&observer_); 56 settings_manager_->AddObserver(&observer_);
57 } 57 }
58 ~SettingsWindowManagerTest() override { 58 ~SettingsWindowManagerTest() override {
59 settings_manager_->RemoveObserver(&observer_); 59 settings_manager_->RemoveObserver(&observer_);
60 } 60 }
61 61
62 void SetUpCommandLine(CommandLine* command_line) override { 62 void SetUpCommandLine(base::CommandLine* command_line) override {
63 command_line->AppendSwitch(::switches::kEnableSettingsWindow); 63 command_line->AppendSwitch(::switches::kEnableSettingsWindow);
64 } 64 }
65 65
66 Profile* CreateTestProfile() { 66 Profile* CreateTestProfile() {
67 CHECK(!test_profile_); 67 CHECK(!test_profile_);
68 68
69 ProfileManager* profile_manager = g_browser_process->profile_manager(); 69 ProfileManager* profile_manager = g_browser_process->profile_manager();
70 base::RunLoop run_loop; 70 base::RunLoop run_loop;
71 profile_manager->CreateProfileAsync( 71 profile_manager->CreateProfileAsync(
72 profile_manager->GenerateNextProfileDirectoryPath(), 72 profile_manager->GenerateNextProfileDirectoryPath(),
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); 206 EXPECT_EQ(1u, chrome::GetTotalBrowserCount());
207 207
208 // Downloads should open in an existing browser window. 208 // Downloads should open in an existing browser window.
209 chrome::ShowDownloads(browser()); 209 chrome::ShowDownloads(browser());
210 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); 210 EXPECT_EQ(1u, chrome::GetTotalBrowserCount());
211 211
212 // About should open a new browser window. 212 // About should open a new browser window.
213 chrome::ShowAboutChrome(browser()); 213 chrome::ShowAboutChrome(browser());
214 EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); 214 EXPECT_EQ(2u, chrome::GetTotalBrowserCount());
215 } 215 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/instant_extended_interactive_uitest.cc ('k') | chrome/browser/ui/startup/autolaunch_prompt_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698