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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 notify_lock_screen_dismissed_call_count(); | 114 notify_lock_screen_dismissed_call_count(); |
115 } | 115 } |
116 | 116 |
117 private: | 117 private: |
118 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 118 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
119 FakeDBusThreadManager* fake_dbus_thread_manager = new FakeDBusThreadManager; | 119 FakeDBusThreadManager* fake_dbus_thread_manager = new FakeDBusThreadManager; |
120 fake_dbus_thread_manager->SetFakeClients(); | 120 fake_dbus_thread_manager->SetFakeClients(); |
121 fake_session_manager_client_ = new FakeSessionManagerClient; | 121 fake_session_manager_client_ = new FakeSessionManagerClient; |
122 fake_dbus_thread_manager->SetSessionManagerClient( | 122 fake_dbus_thread_manager->SetSessionManagerClient( |
123 scoped_ptr<SessionManagerClient>(fake_session_manager_client_)); | 123 scoped_ptr<SessionManagerClient>(fake_session_manager_client_)); |
124 DBusThreadManager::InitializeForTesting(fake_dbus_thread_manager); | 124 DBusThreadManager::SetInstanceForTesting(fake_dbus_thread_manager); |
125 | 125 |
126 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); | 126 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); |
127 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( | 127 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( |
128 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); | 128 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); |
129 } | 129 } |
130 | 130 |
131 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 131 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
132 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); | 132 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
133 } | 133 } |
134 | 134 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 EXPECT_EQ("", tester->GetPassword()); | 251 EXPECT_EQ("", tester->GetPassword()); |
252 | 252 |
253 // Close the locker to match expectations. | 253 // Close the locker to match expectations. |
254 ScreenLocker::Hide(); | 254 ScreenLocker::Hide(); |
255 content::RunAllPendingInMessageLoop(); | 255 content::RunAllPendingInMessageLoop(); |
256 EXPECT_FALSE(tester->IsLocked()); | 256 EXPECT_FALSE(tester->IsLocked()); |
257 EXPECT_TRUE(VerifyLockScreenDismissed()); | 257 EXPECT_TRUE(VerifyLockScreenDismissed()); |
258 } | 258 } |
259 | 259 |
260 } // namespace chromeos | 260 } // namespace chromeos |
OLD | NEW |