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

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

Issue 1111593006: Revert of Revert "Enable BlockingLoginTest, ForceMaximizeOnFirstRunTest, UserCloudPolicyManagerTest (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 72db1d770d54726dfbc12819cc598cf26a1b2492..40a736959f882ce960e68221d9cdce19df85075b 100644
--- a/chrome/browser/chromeos/policy/blocking_login_browsertest.cc
+++ b/chrome/browser/chromeos/policy/blocking_login_browsertest.cc
@@ -78,6 +78,7 @@
const int steps;
const char* username;
const bool enroll_device;
+ const bool use_webview;
};
class BlockingLoginTest
@@ -86,15 +87,12 @@
public testing::WithParamInterface<BlockingLoginTestParam> {
public:
BlockingLoginTest() : profile_added_(NULL) {
- // TODO(nkostylev): Fix this test for webview. http://crbug.com/477402
- set_use_webview(false);
+ set_use_webview(GetParam().use_webview);
}
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,19 +128,6 @@
policy::BrowserPolicyConnectorChromeOS* browser_policy_connector() {
return g_browser_process->platform_part()
->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) {
@@ -268,7 +253,7 @@
// Skip the OOBE, go to the sign-in screen, and wait for the login screen to
// become visible.
- SkipToSigninScreen();
+ WaitForSigninScreen();
EXPECT_FALSE(profile_added_);
// Prepare the fake HTTP responses.
@@ -319,24 +304,43 @@
}
const BlockingLoginTestParam kBlockinLoginTestCases[] = {
- { 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 },
+ {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},
};
INSTANTIATE_TEST_CASE_P(BlockingLoginTestInstance,

Powered by Google App Engine
This is Rietveld 408576698