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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" | 8 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" |
9 #include "chrome/browser/chromeos/cros/mock_network_library.h" | 9 #include "chrome/browser/chromeos/cros/mock_network_library.h" |
10 #include "chrome/browser/chromeos/login/mock_authenticator.h" | 10 #include "chrome/browser/chromeos/login/mock_authenticator.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 .RetiresOnSaturation(); | 126 .RetiresOnSaturation(); |
127 EXPECT_CALL(*mock_session_manager_client_, NotifyLockScreenDismissed()) | 127 EXPECT_CALL(*mock_session_manager_client_, NotifyLockScreenDismissed()) |
128 .Times(1) | 128 .Times(1) |
129 .RetiresOnSaturation(); | 129 .RetiresOnSaturation(); |
130 // Expectations for the status are on the screen lock window. | 130 // Expectations for the status are on the screen lock window. |
131 cros_mock_->SetStatusAreaMocksExpectations(); | 131 cros_mock_->SetStatusAreaMocksExpectations(); |
132 MockNetworkLibrary* mock_network_library = | 132 MockNetworkLibrary* mock_network_library = |
133 cros_mock_->mock_network_library(); | 133 cros_mock_->mock_network_library(); |
134 EXPECT_CALL(*mock_network_library, AddUserActionObserver(_)) | 134 EXPECT_CALL(*mock_network_library, AddUserActionObserver(_)) |
135 .Times(AnyNumber()); | 135 .Times(AnyNumber()); |
136 EXPECT_CALL(*mock_network_library, LoadOncNetworks(_, _, _, _, _)) | 136 EXPECT_CALL(*mock_network_library, LoadOncNetworks(_, _, _, _)) |
137 .WillRepeatedly(Return(true)); | 137 .WillRepeatedly(Return(true)); |
138 } | 138 } |
139 | 139 |
140 virtual void SetUpCommandLine(CommandLine* command_line) { | 140 virtual void SetUpCommandLine(CommandLine* command_line) { |
141 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); | 141 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
142 } | 142 } |
143 | 143 |
144 DISALLOW_COPY_AND_ASSIGN(ScreenLockerTest); | 144 DISALLOW_COPY_AND_ASSIGN(ScreenLockerTest); |
145 }; | 145 }; |
146 | 146 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 content::RunAllPendingInMessageLoop(); | 257 content::RunAllPendingInMessageLoop(); |
258 EXPECT_EQ("", tester->GetPassword()); | 258 EXPECT_EQ("", tester->GetPassword()); |
259 | 259 |
260 // Close the locker to match expectations. | 260 // Close the locker to match expectations. |
261 ScreenLocker::Hide(); | 261 ScreenLocker::Hide(); |
262 content::RunAllPendingInMessageLoop(); | 262 content::RunAllPendingInMessageLoop(); |
263 EXPECT_FALSE(tester->IsLocked()); | 263 EXPECT_FALSE(tester->IsLocked()); |
264 } | 264 } |
265 | 265 |
266 } // namespace chromeos | 266 } // namespace chromeos |
OLD | NEW |