OLD | NEW |
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/browser/chromeos/login/screen_locker.h" | 5 #include "chrome/browser/chromeos/login/screen_locker.h" |
6 | 6 |
7 #include "ash/wm/window_state.h" | 7 #include "ash/wm/window_state.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 scoped_ptr<SessionManagerClient>(fake_session_manager_client_)); | 125 scoped_ptr<SessionManagerClient>(fake_session_manager_client_)); |
126 DBusThreadManager::SetInstanceForTesting(fake_dbus_thread_manager); | 126 DBusThreadManager::SetInstanceForTesting(fake_dbus_thread_manager); |
127 | 127 |
128 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); | 128 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); |
129 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( | 129 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( |
130 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); | 130 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); |
131 } | 131 } |
132 | 132 |
133 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 133 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
134 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); | 134 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
| 135 command_line->AppendSwitch(switches::kForceMultiProfileInTests); |
135 } | 136 } |
136 | 137 |
137 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; | 138 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; |
138 | 139 |
139 DISALLOW_COPY_AND_ASSIGN(ScreenLockerTest); | 140 DISALLOW_COPY_AND_ASSIGN(ScreenLockerTest); |
140 }; | 141 }; |
141 | 142 |
142 IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestBasic) { | 143 IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestBasic) { |
143 ScreenLocker::Show(); | 144 ScreenLocker::Show(); |
144 scoped_ptr<test::ScreenLockerTester> tester(ScreenLocker::GetTester()); | 145 scoped_ptr<test::ScreenLockerTester> tester(ScreenLocker::GetTester()); |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 EXPECT_EQ("", tester->GetPassword()); | 294 EXPECT_EQ("", tester->GetPassword()); |
294 | 295 |
295 // Close the locker to match expectations. | 296 // Close the locker to match expectations. |
296 ScreenLocker::Hide(); | 297 ScreenLocker::Hide(); |
297 content::RunAllPendingInMessageLoop(); | 298 content::RunAllPendingInMessageLoop(); |
298 EXPECT_FALSE(tester->IsLocked()); | 299 EXPECT_FALSE(tester->IsLocked()); |
299 EXPECT_TRUE(VerifyLockScreenDismissed()); | 300 EXPECT_TRUE(VerifyLockScreenDismissed()); |
300 } | 301 } |
301 | 302 |
302 } // namespace chromeos | 303 } // namespace chromeos |
OLD | NEW |