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

Unified Diff: chrome/browser/chromeos/policy/blocking_login_browsertest.cc

Issue 1112843003: Revert "Enable BlockingLoginTest, ForceMaximizeOnFirstRunTest, UserCloudPolicyManagerTest, for webv… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/policy/blocking_login_browsertest.cc
diff --git a/chrome/browser/chromeos/policy/blocking_login_browsertest.cc b/chrome/browser/chromeos/policy/blocking_login_browsertest.cc
index 40a736959f882ce960e68221d9cdce19df85075b..72db1d770d54726dfbc12819cc598cf26a1b2492 100644
--- a/chrome/browser/chromeos/policy/blocking_login_browsertest.cc
+++ b/chrome/browser/chromeos/policy/blocking_login_browsertest.cc
@@ -78,7 +78,6 @@ struct BlockingLoginTestParam {
const int steps;
const char* username;
const bool enroll_device;
- const bool use_webview;
};
class BlockingLoginTest
@@ -87,12 +86,15 @@ class BlockingLoginTest
public testing::WithParamInterface<BlockingLoginTestParam> {
public:
BlockingLoginTest() : profile_added_(NULL) {
- set_use_webview(GetParam().use_webview);
+ // TODO(nkostylev): Fix this test for webview. http://crbug.com/477402
+ set_use_webview(false);
}
void SetUpCommandLine(base::CommandLine* command_line) override {
OobeBaseTest::SetUpCommandLine(command_line);
+ command_line->AppendSwitchASCII(::switches::kAuthExtensionPath,
+ "gaia_auth");
command_line->AppendSwitchASCII(
policy::switches::kDeviceManagementUrl,
embedded_test_server()->GetURL("/device_management").spec());
@@ -130,6 +132,19 @@ class BlockingLoginTest
->browser_policy_connector_chromeos();
}
+ void SkipToSigninScreen() {
+ WizardController::SkipPostLoginScreensForTesting();
+ WizardController* wizard_controller =
+ WizardController::default_controller();
+ ASSERT_TRUE(wizard_controller);
+ wizard_controller->SkipToLoginForTesting(LoginScreenContext());
+
+ content::WindowedNotificationObserver(
+ chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE,
+ content::NotificationService::AllSources()).Wait();
+ RunUntilIdle();
+ }
+
void EnrollDevice(const std::string& username) {
base::RunLoop loop;
policy::EnterpriseInstallAttributes::LockResult result;
@@ -253,7 +268,7 @@ IN_PROC_BROWSER_TEST_P(BlockingLoginTest, LoginBlocksForUser) {
// Skip the OOBE, go to the sign-in screen, and wait for the login screen to
// become visible.
- WaitForSigninScreen();
+ SkipToSigninScreen();
EXPECT_FALSE(profile_added_);
// Prepare the fake HTTP responses.
@@ -304,43 +319,24 @@ IN_PROC_BROWSER_TEST_P(BlockingLoginTest, LoginBlocksForUser) {
}
const BlockingLoginTestParam kBlockinLoginTestCases[] = {
- {0, kUsername, true, false},
- {1, kUsername, true, false},
- {2, kUsername, true, false},
- {3, kUsername, true, false},
- {4, kUsername, true, false},
- {5, kUsername, true, false},
- {0, kUsername, false, false},
- {1, kUsername, false, false},
- {2, kUsername, false, false},
- {3, kUsername, false, false},
- {4, kUsername, false, false},
- {5, kUsername, false, false},
- {0, kUsernameOtherDomain, true, false},
- {1, kUsernameOtherDomain, true, false},
- {2, kUsernameOtherDomain, true, false},
- {3, kUsernameOtherDomain, true, false},
- {4, kUsernameOtherDomain, true, false},
- {5, kUsernameOtherDomain, true, false},
-
- {0, kUsername, true, true},
- {1, kUsername, true, true},
- {2, kUsername, true, true},
- {3, kUsername, true, true},
- {4, kUsername, true, true},
- {5, kUsername, true, true},
- {0, kUsername, false, true},
- {1, kUsername, false, true},
- {2, kUsername, false, true},
- {3, kUsername, false, true},
- {4, kUsername, false, true},
- {5, kUsername, false, true},
- {0, kUsernameOtherDomain, true, true},
- {1, kUsernameOtherDomain, true, true},
- {2, kUsernameOtherDomain, true, true},
- {3, kUsernameOtherDomain, true, true},
- {4, kUsernameOtherDomain, true, true},
- {5, kUsernameOtherDomain, true, true},
+ { 0, kUsername, true },
+ { 1, kUsername, true },
+ { 2, kUsername, true },
+ { 3, kUsername, true },
+ { 4, kUsername, true },
+ { 5, kUsername, true },
+ { 0, kUsername, false },
+ { 1, kUsername, false },
+ { 2, kUsername, false },
+ { 3, kUsername, false },
+ { 4, kUsername, false },
+ { 5, kUsername, false },
+ { 0, kUsernameOtherDomain, true },
+ { 1, kUsernameOtherDomain, true },
+ { 2, kUsernameOtherDomain, true },
+ { 3, kUsernameOtherDomain, true },
+ { 4, kUsernameOtherDomain, true },
+ { 5, kUsernameOtherDomain, true },
};
INSTANTIATE_TEST_CASE_P(BlockingLoginTestInstance,

Powered by Google App Engine
This is Rietveld 408576698