Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: chrome/browser/chromeos/login/login_browsertest.cc

Issue 2458002: Initialize screen locker before letting user logged in. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: fix login_browsertest Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/chromeos/login/screen_locker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/login_browsertest.cc
diff --git a/chrome/browser/chromeos/login/login_browsertest.cc b/chrome/browser/chromeos/login/login_browsertest.cc
index da51a39fc9711e2d6373946aeccf4ee902a00a67..4c1800f564bfc8ee3948a0982a885d69fb7b4091 100644
--- a/chrome/browser/chromeos/login/login_browsertest.cc
+++ b/chrome/browser/chromeos/login/login_browsertest.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/chromeos/cros/mock_library_loader.h"
#include "chrome/browser/chromeos/cros/mock_network_library.h"
#include "chrome/browser/chromeos/cros/mock_power_library.h"
+#include "chrome/browser/chromeos/cros/mock_screen_lock_library.h"
#include "chrome/browser/chromeos/cros/mock_synaptics_library.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/in_process_browser_test.h"
@@ -47,6 +48,7 @@ class LoginTestBase : public InProcessBrowserTest {
testApi_->SetSynapticsLibrary(&mock_synaptics_library_, false);
testApi_->SetCryptohomeLibrary(&mock_cryptohome_library_, false);
+ testApi_->SetScreenLockLibrary(&mock_screen_lock_library_, false);
}
protected:
@@ -55,6 +57,7 @@ class LoginTestBase : public InProcessBrowserTest {
NiceMock<MockLanguageLibrary> mock_language_library_;
NiceMock<MockNetworkLibrary> mock_network_library_;
NiceMock<MockPowerLibrary> mock_power_library_;
+ NiceMock<MockScreenLockLibrary> mock_screen_lock_library_;
NiceMock<MockSynapticsLibrary> mock_synaptics_library_;
ImePropertyList ime_properties_;
chromeos::CrosLibrary::TestApi* testApi_;
@@ -65,6 +68,8 @@ class LoginUserTest : public LoginTestBase {
LoginUserTest() {
EXPECT_CALL(mock_cryptohome_library_, IsMounted())
.WillRepeatedly(Return(true));
+ EXPECT_CALL(mock_screen_lock_library_, AddObserver(_))
+ .WillOnce(Return());
}
virtual void SetUpCommandLine(CommandLine* command_line) {
@@ -107,4 +112,3 @@ IN_PROC_BROWSER_TEST_F(LoginProfileTest, UserNotPassed) {
}
} // namespace chromeos
-
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/chromeos/login/screen_locker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698