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_tester.h" | 5 #include "chrome/browser/chromeos/login/lock/screen_locker_tester.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 waiting_ = true; | 75 waiting_ = true; |
76 content::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 base::MessageLoopForUI::current()->Quit(); | 85 base::MessageLoopForUI::current()->QuitWhenIdle(); |
86 } | 86 } |
87 | 87 |
88 } // anyonymous namespace | 88 } // anyonymous namespace |
89 | 89 |
90 namespace chromeos { | 90 namespace chromeos { |
91 | 91 |
92 namespace test { | 92 namespace test { |
93 | 93 |
94 class WebUIScreenLockerTester : public ScreenLockerTester { | 94 class WebUIScreenLockerTester : public ScreenLockerTester { |
95 public: | 95 public: |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 new FakeExtendedAuthenticator(ScreenLocker::screen_locker_, user_context); | 209 new FakeExtendedAuthenticator(ScreenLocker::screen_locker_, user_context); |
210 } | 210 } |
211 | 211 |
212 } // namespace test | 212 } // namespace test |
213 | 213 |
214 test::ScreenLockerTester* ScreenLocker::GetTester() { | 214 test::ScreenLockerTester* ScreenLocker::GetTester() { |
215 return new test::WebUIScreenLockerTester(); | 215 return new test::WebUIScreenLockerTester(); |
216 } | 216 } |
217 | 217 |
218 } // namespace chromeos | 218 } // namespace chromeos |
OLD | NEW |