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

Side by Side Diff: chrome/browser/ui/app_list/app_list_controller_browsertest.cc

Issue 2452983002: ChromeOS: This CL moves chromeos/login/user_names* to user_mananger. (Closed)
Patch Set: Remove unused include Created 4 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 12 matching lines...) Expand all
23 #include "chrome/test/base/testing_profile.h" 23 #include "chrome/test/base/testing_profile.h"
24 #include "ui/app_list/app_list_model.h" 24 #include "ui/app_list/app_list_model.h"
25 #include "ui/app_list/app_list_switches.h" 25 #include "ui/app_list/app_list_switches.h"
26 #include "ui/app_list/search_box_model.h" 26 #include "ui/app_list/search_box_model.h"
27 #include "ui/app_list/search_result.h" 27 #include "ui/app_list/search_result.h"
28 #include "ui/app_list/search_result_observer.h" 28 #include "ui/app_list/search_result_observer.h"
29 #include "ui/base/models/list_model_observer.h" 29 #include "ui/base/models/list_model_observer.h"
30 30
31 #if defined(OS_CHROMEOS) 31 #if defined(OS_CHROMEOS)
32 #include "chromeos/chromeos_switches.h" 32 #include "chromeos/chromeos_switches.h"
33 #include "chromeos/login/user_names.h" 33 #include "components/user_manager/user_names.h"
34 #endif // defined(OS_CHROMEOS) 34 #endif // defined(OS_CHROMEOS)
35 35
36 // Browser Test for AppListController that runs on all platforms supporting 36 // Browser Test for AppListController that runs on all platforms supporting
37 // app_list. 37 // app_list.
38 typedef InProcessBrowserTest AppListControllerBrowserTest; 38 typedef InProcessBrowserTest AppListControllerBrowserTest;
39 39
40 // Test the CreateNewWindow function of the controller delegate. 40 // Test the CreateNewWindow function of the controller delegate.
41 IN_PROC_BROWSER_TEST_F(AppListControllerBrowserTest, CreateNewWindow) { 41 IN_PROC_BROWSER_TEST_F(AppListControllerBrowserTest, CreateNewWindow) {
42 AppListService* service = AppListService::Get(); 42 AppListService* service = AppListService::Get();
43 AppListControllerDelegate* controller(service->GetControllerDelegate()); 43 AppListControllerDelegate* controller(service->GetControllerDelegate());
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 void SetUpCommandLine(base::CommandLine* command_line) override; 175 void SetUpCommandLine(base::CommandLine* command_line) override;
176 176
177 private: 177 private:
178 DISALLOW_COPY_AND_ASSIGN(AppListControllerGuestModeBrowserTest); 178 DISALLOW_COPY_AND_ASSIGN(AppListControllerGuestModeBrowserTest);
179 }; 179 };
180 180
181 void AppListControllerGuestModeBrowserTest::SetUpCommandLine( 181 void AppListControllerGuestModeBrowserTest::SetUpCommandLine(
182 base::CommandLine* command_line) { 182 base::CommandLine* command_line) {
183 command_line->AppendSwitch(chromeos::switches::kGuestSession); 183 command_line->AppendSwitch(chromeos::switches::kGuestSession);
184 command_line->AppendSwitchASCII(chromeos::switches::kLoginUser, 184 command_line->AppendSwitchASCII(chromeos::switches::kLoginUser,
185 chromeos::login::kGuestUserName); 185 user_manager::kGuestUserName);
186 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, 186 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile,
187 TestingProfile::kTestUserProfileDir); 187 TestingProfile::kTestUserProfileDir);
188 command_line->AppendSwitch(switches::kIncognito); 188 command_line->AppendSwitch(switches::kIncognito);
189 } 189 }
190 190
191 // Test creating the initial app list in guest mode. 191 // Test creating the initial app list in guest mode.
192 IN_PROC_BROWSER_TEST_F(AppListControllerGuestModeBrowserTest, Incognito) { 192 IN_PROC_BROWSER_TEST_F(AppListControllerGuestModeBrowserTest, Incognito) {
193 AppListService* service = AppListService::Get(); 193 AppListService* service = AppListService::Get();
194 EXPECT_TRUE(service->GetCurrentAppListProfile()); 194 EXPECT_TRUE(service->GetCurrentAppListProfile());
195 195
196 service->ShowForProfile(browser()->profile()); 196 service->ShowForProfile(browser()->profile());
197 EXPECT_EQ(browser()->profile(), service->GetCurrentAppListProfile()); 197 EXPECT_EQ(browser()->profile(), service->GetCurrentAppListProfile());
198 } 198 }
199 199
200 #endif // defined(OS_CHROMEOS) 200 #endif // defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698