| OLD | NEW |
| 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/chromeos/login/lock/screen_locker.h" | 5 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "ash/wm/window_state.h" | 9 #include "ash/wm/window_state.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 return 1 == fake_session_manager_client_-> | 120 return 1 == fake_session_manager_client_-> |
| 121 notify_lock_screen_dismissed_call_count(); | 121 notify_lock_screen_dismissed_call_count(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 private: | 124 private: |
| 125 void SetUpInProcessBrowserTestFixture() override { | 125 void SetUpInProcessBrowserTestFixture() override { |
| 126 fake_session_manager_client_ = new FakeSessionManagerClient; | 126 fake_session_manager_client_ = new FakeSessionManagerClient; |
| 127 DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient( | 127 DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient( |
| 128 std::unique_ptr<SessionManagerClient>(fake_session_manager_client_)); | 128 std::unique_ptr<SessionManagerClient>(fake_session_manager_client_)); |
| 129 | 129 |
| 130 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); | |
| 131 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( | 130 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( |
| 132 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); | 131 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); |
| 133 } | 132 } |
| 134 | 133 |
| 135 void SetUpCommandLine(base::CommandLine* command_line) override { | 134 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 136 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); | 135 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
| 137 } | 136 } |
| 138 | 137 |
| 139 std::unique_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; | 138 std::unique_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; |
| 140 | 139 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 EXPECT_EQ("", tester->GetPassword()); | 321 EXPECT_EQ("", tester->GetPassword()); |
| 323 | 322 |
| 324 // Close the locker to match expectations. | 323 // Close the locker to match expectations. |
| 325 ScreenLocker::Hide(); | 324 ScreenLocker::Hide(); |
| 326 content::RunAllPendingInMessageLoop(); | 325 content::RunAllPendingInMessageLoop(); |
| 327 EXPECT_FALSE(tester->IsLocked()); | 326 EXPECT_FALSE(tester->IsLocked()); |
| 328 EXPECT_TRUE(VerifyLockScreenDismissed()); | 327 EXPECT_TRUE(VerifyLockScreenDismissed()); |
| 329 } | 328 } |
| 330 | 329 |
| 331 } // namespace chromeos | 330 } // namespace chromeos |
| OLD | NEW |