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_tester.h" | 5 #include "chrome/browser/chromeos/login/screen_locker_tester.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 locker_->SetLoginStatusConsumer(this); | 66 locker_->SetLoginStatusConsumer(this); |
67 } | 67 } |
68 | 68 |
69 LoginAttemptObserver::~LoginAttemptObserver() { | 69 LoginAttemptObserver::~LoginAttemptObserver() { |
70 locker_->SetLoginStatusConsumer(NULL); | 70 locker_->SetLoginStatusConsumer(NULL); |
71 } | 71 } |
72 | 72 |
73 void LoginAttemptObserver::WaitForAttempt() { | 73 void LoginAttemptObserver::WaitForAttempt() { |
74 if (!login_attempted_) { | 74 if (!login_attempted_) { |
75 waiting_ = true; | 75 waiting_ = true; |
76 ui_test_utils::RunMessageLoop(); | 76 content::RunMessageLoop(); |
77 waiting_ = false; | 77 waiting_ = false; |
78 } | 78 } |
79 ASSERT_TRUE(login_attempted_); | 79 ASSERT_TRUE(login_attempted_); |
80 } | 80 } |
81 | 81 |
82 void LoginAttemptObserver::LoginAttempted() { | 82 void LoginAttemptObserver::LoginAttempted() { |
83 login_attempted_ = true; | 83 login_attempted_ = true; |
84 if (waiting_) | 84 if (waiting_) |
85 MessageLoopForUI::current()->Quit(); | 85 MessageLoopForUI::current()->Quit(); |
86 } | 86 } |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 new MockAuthenticator(ScreenLocker::screen_locker_, user, password)); | 206 new MockAuthenticator(ScreenLocker::screen_locker_, user, password)); |
207 } | 207 } |
208 | 208 |
209 } // namespace test | 209 } // namespace test |
210 | 210 |
211 test::ScreenLockerTester* ScreenLocker::GetTester() { | 211 test::ScreenLockerTester* ScreenLocker::GetTester() { |
212 return new test::WebUIScreenLockerTester(); | 212 return new test::WebUIScreenLockerTester(); |
213 } | 213 } |
214 | 214 |
215 } // namespace chromeos | 215 } // namespace chromeos |
OLD | NEW |