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

Side by Side Diff: chrome/browser/chromeos/login/ui/user_adding_screen_browsertest.cc

Issue 294033002: Multi-profile flag cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Return --test-type flag back to profile_manager_unittest.cc Created 6 years, 7 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 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 "ash/session/session_state_delegate.h" 5 #include "ash/session/session_state_delegate.h"
6 #include "ash/shell.h" 6 #include "ash/shell.h"
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/chromeos/login/lock/screen_locker.h" 9 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
10 #include "chrome/browser/chromeos/login/lock/screen_locker_tester.h" 10 #include "chrome/browser/chromeos/login/lock/screen_locker_tester.h"
11 #include "chrome/browser/chromeos/login/login_manager_test.h" 11 #include "chrome/browser/chromeos/login/login_manager_test.h"
12 #include "chrome/browser/chromeos/login/startup_utils.h" 12 #include "chrome/browser/chromeos/login/startup_utils.h"
13 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" 13 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
14 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" 14 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h"
15 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" 15 #include "chrome/browser/chromeos/login/ui/webui_login_view.h"
16 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" 16 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h"
17 #include "chrome/browser/chromeos/login/users/user_manager.h" 17 #include "chrome/browser/chromeos/login/users/user_manager.h"
18 #include "chrome/common/chrome_switches.h"
19 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
20 #include "chrome/test/base/in_process_browser_test.h" 19 #include "chrome/test/base/in_process_browser_test.h"
21 #include "content/public/test/test_utils.h" 20 #include "content/public/test/test_utils.h"
22 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
23 22
24 using namespace testing; 23 using namespace testing;
25 24
26 namespace { 25 namespace {
27 26
28 const char* kTestUsers[] = {"test-user1@gmail.com", 27 const char* kTestUsers[] = {"test-user1@gmail.com",
29 "test-user2@gmail.com", 28 "test-user2@gmail.com",
30 "test-user3@gmail.com"}; 29 "test-user3@gmail.com"};
31 30
32 } // anonymous namespace 31 } // anonymous namespace
33 32
34 namespace chromeos { 33 namespace chromeos {
35 34
36 class UserAddingScreenTest : public LoginManagerTest, 35 class UserAddingScreenTest : public LoginManagerTest,
37 public UserAddingScreen::Observer { 36 public UserAddingScreen::Observer {
38 public: 37 public:
39 UserAddingScreenTest() : LoginManagerTest(false), 38 UserAddingScreenTest() : LoginManagerTest(false),
40 user_adding_started_(0), 39 user_adding_started_(0),
41 user_adding_finished_(0) { 40 user_adding_finished_(0) {
42 } 41 }
43 42
44 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
45 LoginManagerTest::SetUpCommandLine(command_line);
46 command_line->AppendSwitch(::switches::kMultiProfiles);
47 }
48
49 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 43 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
50 LoginManagerTest::SetUpInProcessBrowserTestFixture(); 44 LoginManagerTest::SetUpInProcessBrowserTestFixture();
51 UserAddingScreen::Get()->AddObserver(this); 45 UserAddingScreen::Get()->AddObserver(this);
52 } 46 }
53 47
54 virtual void OnUserAddingFinished() OVERRIDE { ++user_adding_finished_; } 48 virtual void OnUserAddingFinished() OVERRIDE { ++user_adding_finished_; }
55 49
56 virtual void OnUserAddingStarted() OVERRIDE { ++user_adding_started_; } 50 virtual void OnUserAddingStarted() OVERRIDE { ++user_adding_started_; }
57 51
58 void SetUserCanLock(User* user, bool can_lock) { 52 void SetUserCanLock(User* user, bool can_lock) {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 content::NotificationService::AllSources()).Wait(); 256 content::NotificationService::AllSources()).Wait();
263 257
264 UserAddingScreen::Get()->Start(); 258 UserAddingScreen::Get()->Start();
265 content::RunAllPendingInMessageLoop(); 259 content::RunAllPendingInMessageLoop();
266 CheckScreenIsVisible(); 260 CheckScreenIsVisible();
267 UserAddingScreen::Get()->Cancel(); 261 UserAddingScreen::Get()->Cancel();
268 content::RunAllPendingInMessageLoop(); 262 content::RunAllPendingInMessageLoop();
269 } 263 }
270 264
271 } // namespace chromeos 265 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698