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

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

Issue 10855244: Remove the --enable-device-policy and --enable-onc-policy flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated comment Created 8 years, 4 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
Index: chrome/browser/chromeos/login/existing_user_controller_browsertest.cc
diff --git a/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc b/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc
index 6b8b70161d2d81cd40fad8baad0b3e7a97508ced..15a5a74956c331297cd999b000ec511c72e09e5a 100644
--- a/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc
@@ -32,8 +32,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/l10n/l10n_util.h"
-namespace chromeos {
-
+using ::testing::_;
using ::testing::AnyNumber;
using ::testing::AnyOf;
using ::testing::Invoke;
@@ -41,7 +40,10 @@ using ::testing::InvokeWithoutArgs;
using ::testing::Return;
using ::testing::ReturnNull;
using ::testing::WithArg;
-using ::testing::_;
+
+namespace chromeos {
+
+namespace {
const char kUsername[] = "test_user@gmail.com";
const char kNewUsername[] = "test_new_user@gmail.com";
@@ -94,6 +96,18 @@ class MockLoginDisplayHost : public LoginDisplayHost {
DISALLOW_COPY_AND_ASSIGN(MockLoginDisplayHost);
};
+scoped_refptr<Authenticator> CreateAuthenticator(
+ LoginStatusConsumer* consumer) {
+ return new MockAuthenticator(consumer, kUsername, kPassword);
+}
+
+scoped_refptr<Authenticator> CreateAuthenticatorNewUser(
+ LoginStatusConsumer* consumer) {
+ return new MockAuthenticator(consumer, kNewUsername, kPassword);
+}
+
+} // namespace
+
class ExistingUserControllerTest : public CrosInProcessBrowserTest {
protected:
ExistingUserControllerTest()
@@ -120,6 +134,9 @@ class ExistingUserControllerTest : public CrosInProcessBrowserTest {
mock_network_library_ = cros_mock_->mock_network_library();
EXPECT_CALL(*mock_network_library_, AddUserActionObserver(_))
.Times(AnyNumber());
+ EXPECT_CALL(*mock_network_library_, LoadOncNetworks(_, _, _, _))
+ .WillRepeatedly(Return(true));
+
MockSessionManagerClient* mock_session_manager_client =
mock_dbus_thread_manager->mock_session_manager_client();
EXPECT_CALL(*mock_session_manager_client, EmitLoginPromptReady())
@@ -222,16 +239,6 @@ class ExistingUserControllerTest : public CrosInProcessBrowserTest {
DISALLOW_COPY_AND_ASSIGN(ExistingUserControllerTest);
};
-scoped_refptr<Authenticator> CreateAuthenticator(
- LoginStatusConsumer* consumer) {
- return new MockAuthenticator(consumer, kUsername, kPassword);
-}
-
-scoped_refptr<Authenticator> CreateAuthenticatorNewUser(
- LoginStatusConsumer* consumer) {
- return new MockAuthenticator(consumer, kNewUsername, kPassword);
-}
-
IN_PROC_BROWSER_TEST_F(ExistingUserControllerTest, ExistingUserLogin) {
EXPECT_CALL(*mock_login_display_, SetUIEnabled(false))
.Times(1);

Powered by Google App Engine
This is Rietveld 408576698