OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
8 #include "chrome/browser/automation/ui_controls.h" | 8 #include "chrome/browser/automation/ui_controls.h" |
9 #include "chrome/browser/browser.h" | 9 #include "chrome/browser/browser.h" |
10 #include "chrome/browser/browser_window.h" | 10 #include "chrome/browser/browser_window.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 EXPECT_CALL(*mock_screen_lock_library_, NotifyScreenUnlockCompleted()) | 134 EXPECT_CALL(*mock_screen_lock_library_, NotifyScreenUnlockCompleted()) |
135 .Times(1) | 135 .Times(1) |
136 .RetiresOnSaturation(); | 136 .RetiresOnSaturation(); |
137 // Expectations for the status are on the screen lock window. | 137 // Expectations for the status are on the screen lock window. |
138 SetStatusAreaMocksExpectations(); | 138 SetStatusAreaMocksExpectations(); |
139 // Expectations for the status area on the browser window. | 139 // Expectations for the status area on the browser window. |
140 SetStatusAreaMocksExpectations(); | 140 SetStatusAreaMocksExpectations(); |
141 } | 141 } |
142 | 142 |
143 virtual void SetUpCommandLine(CommandLine* command_line) { | 143 virtual void SetUpCommandLine(CommandLine* command_line) { |
144 command_line->AppendSwitchWithValue(switches::kLoginProfile, "user"); | 144 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
145 command_line->AppendSwitch(switches::kNoFirstRun); | 145 command_line->AppendSwitch(switches::kNoFirstRun); |
146 } | 146 } |
147 | 147 |
148 DISALLOW_COPY_AND_ASSIGN(ScreenLockerTest); | 148 DISALLOW_COPY_AND_ASSIGN(ScreenLockerTest); |
149 }; | 149 }; |
150 | 150 |
151 IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestBasic) { | 151 IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestBasic) { |
152 EXPECT_CALL(*mock_input_method_library_, GetNumActiveInputMethods()) | 152 EXPECT_CALL(*mock_input_method_library_, GetNumActiveInputMethods()) |
153 .Times(1) | 153 .Times(1) |
154 .WillRepeatedly((testing::Return(0))) | 154 .WillRepeatedly((testing::Return(0))) |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 ScreenLocker::Show(); | 256 ScreenLocker::Show(); |
257 EXPECT_TRUE(tester->IsLocked()); | 257 EXPECT_TRUE(tester->IsLocked()); |
258 | 258 |
259 // Close the locker to match expectations. | 259 // Close the locker to match expectations. |
260 ScreenLocker::Hide(); | 260 ScreenLocker::Hide(); |
261 ui_test_utils::RunAllPendingInMessageLoop(); | 261 ui_test_utils::RunAllPendingInMessageLoop(); |
262 EXPECT_FALSE(tester->IsLocked()); | 262 EXPECT_FALSE(tester->IsLocked()); |
263 } | 263 } |
264 | 264 |
265 } // namespace chromeos | 265 } // namespace chromeos |
OLD | NEW |