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); | |
136 } | 135 } |
137 | 136 |
138 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; | 137 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; |
139 | 138 |
140 DISALLOW_COPY_AND_ASSIGN(ScreenLockerTest); | 139 DISALLOW_COPY_AND_ASSIGN(ScreenLockerTest); |
141 }; | 140 }; |
142 | 141 |
143 IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestBasic) { | 142 IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestBasic) { |
144 ScreenLocker::Show(); | 143 ScreenLocker::Show(); |
145 scoped_ptr<test::ScreenLockerTester> tester(ScreenLocker::GetTester()); | 144 scoped_ptr<test::ScreenLockerTester> tester(ScreenLocker::GetTester()); |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 EXPECT_EQ("", tester->GetPassword()); | 293 EXPECT_EQ("", tester->GetPassword()); |
295 | 294 |
296 // Close the locker to match expectations. | 295 // Close the locker to match expectations. |
297 ScreenLocker::Hide(); | 296 ScreenLocker::Hide(); |
298 content::RunAllPendingInMessageLoop(); | 297 content::RunAllPendingInMessageLoop(); |
299 EXPECT_FALSE(tester->IsLocked()); | 298 EXPECT_FALSE(tester->IsLocked()); |
300 EXPECT_TRUE(VerifyLockScreenDismissed()); | 299 EXPECT_TRUE(VerifyLockScreenDismissed()); |
301 } | 300 } |
302 | 301 |
303 } // namespace chromeos | 302 } // namespace chromeos |
OLD | NEW |