Commit 48bda7e3 authored by satorux@chromium.org's avatar satorux@chromium.org

chromeos: Fix LoginUserTest.UserPassed and LoginProfileTest.UserNotPassed.

Fix mock expectations.

TEST=out/Release/browser_tests --gtest_filter=LoginProfileTest.UserNotPassed;
out/Release/browser_tests --gtest_filter=LoginUserTest.UserPassed
BUG=chromium-os:2335

Review URL: http://codereview.chromium.org/8639008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111183 0039d316-1c4b-4281-b951-d872f2087c98
parent 55a3ae20
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
namespace chromeos { namespace chromeos {
using ::testing::_; using ::testing::_;
using ::testing::AtLeast;
using ::testing::Return; using ::testing::Return;
class LoginTestBase : public CrosInProcessBrowserTest { class LoginTestBase : public CrosInProcessBrowserTest {
...@@ -54,7 +55,11 @@ class LoginUserTest : public LoginTestBase { ...@@ -54,7 +55,11 @@ class LoginUserTest : public LoginTestBase {
// TODO(nkostylev): Remove this once Aura build includes ScreenLocker. // TODO(nkostylev): Remove this once Aura build includes ScreenLocker.
#if !defined(USE_AURA) #if !defined(USE_AURA)
EXPECT_CALL(*mock_screen_lock_library_, AddObserver(_)) EXPECT_CALL(*mock_screen_lock_library_, AddObserver(_))
.WillOnce(Return()); .Times(AtLeast(1))
.WillRepeatedly(Return());
EXPECT_CALL(*mock_screen_lock_library_, RemoveObserver(_))
.Times(AtLeast(1))
.WillRepeatedly(Return());
#endif #endif
} }
...@@ -65,7 +70,7 @@ class LoginUserTest : public LoginTestBase { ...@@ -65,7 +70,7 @@ class LoginUserTest : public LoginTestBase {
} }
}; };
class LoginProfileTest : public LoginTestBase { class LoginProfileTest : public LoginUserTest {
protected: protected:
virtual void SetUpCommandLine(CommandLine* command_line) { virtual void SetUpCommandLine(CommandLine* command_line) {
command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); command_line->AppendSwitchASCII(switches::kLoginProfile, "user");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment