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

Unified Diff: chrome/browser/chromeos/policy/force_maximize_on_first_run_chromeos_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/force_maximize_on_first_run_chromeos_browsertest.cc
diff --git a/chrome/browser/chromeos/policy/force_maximize_on_first_run_chromeos_browsertest.cc b/chrome/browser/chromeos/policy/force_maximize_on_first_run_chromeos_browsertest.cc
index e6d3faf186ce8fff21936258343ee79d5497a86c..814bbeea13a7a3b2c838b43d38913c74b5980c87 100644
--- a/chrome/browser/chromeos/policy/force_maximize_on_first_run_chromeos_browsertest.cc
+++ b/chrome/browser/chromeos/policy/force_maximize_on_first_run_chromeos_browsertest.cc
@@ -29,9 +29,14 @@
namespace policy {
-class ForceMaximizeOnFirstRunTest : public LoginPolicyTestBase {
+// Boolean parameter is used to run this test for webview (true) and for
+// iframe (false) GAIA sign in.
+class ForceMaximizeOnFirstRunTest : public LoginPolicyTestBase,
+ public testing::WithParamInterface<bool> {
protected:
- ForceMaximizeOnFirstRunTest() : LoginPolicyTestBase() {}
+ ForceMaximizeOnFirstRunTest() : LoginPolicyTestBase() {
+ set_use_webview(GetParam());
+ }
scoped_ptr<base::DictionaryValue> GetMandatoryPoliciesValue() const override {
scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
@@ -64,7 +69,7 @@
DISALLOW_COPY_AND_ASSIGN(ForceMaximizeOnFirstRunTest);
};
-IN_PROC_BROWSER_TEST_F(ForceMaximizeOnFirstRunTest, PRE_TwoRuns) {
+IN_PROC_BROWSER_TEST_P(ForceMaximizeOnFirstRunTest, PRE_TwoRuns) {
SetUpResolution();
SkipToLoginScreen();
LogIn(kAccountId, kAccountPassword);
@@ -88,7 +93,7 @@
EXPECT_FALSE(browser1->window()->IsMaximized());
}
-IN_PROC_BROWSER_TEST_F(ForceMaximizeOnFirstRunTest, TwoRuns) {
+IN_PROC_BROWSER_TEST_P(ForceMaximizeOnFirstRunTest, TwoRuns) {
SetUpResolution();
content::WindowedNotificationObserver(
chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE,
@@ -100,9 +105,9 @@
EXPECT_FALSE(browser->window()->IsMaximized());
}
-class ForceMaximizetPolicyFalseTest : public ForceMaximizeOnFirstRunTest {
+class ForceMaximizePolicyFalseTest : public ForceMaximizeOnFirstRunTest {
protected:
- ForceMaximizetPolicyFalseTest() : ForceMaximizeOnFirstRunTest() {}
+ ForceMaximizePolicyFalseTest() : ForceMaximizeOnFirstRunTest() {}
scoped_ptr<base::DictionaryValue> GetMandatoryPoliciesValue() const override {
scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
@@ -111,10 +116,10 @@
}
private:
- DISALLOW_COPY_AND_ASSIGN(ForceMaximizetPolicyFalseTest);
+ DISALLOW_COPY_AND_ASSIGN(ForceMaximizePolicyFalseTest);
};
-IN_PROC_BROWSER_TEST_F(ForceMaximizetPolicyFalseTest, GeneralFirstRun) {
+IN_PROC_BROWSER_TEST_P(ForceMaximizePolicyFalseTest, GeneralFirstRun) {
SetUpResolution();
SkipToLoginScreen();
LogIn(kAccountId, kAccountPassword);
@@ -127,4 +132,11 @@
EXPECT_FALSE(browser->window()->IsMaximized());
}
+INSTANTIATE_TEST_CASE_P(ForceMaximizeOnFirstRunTestSuite,
+ ForceMaximizeOnFirstRunTest,
+ testing::Bool());
+
+INSTANTIATE_TEST_CASE_P(ForceMaximizePolicyFalseTestSuite,
+ ForceMaximizePolicyFalseTest,
+ testing::Bool());
} // namespace policy

Powered by Google App Engine
This is Rietveld 408576698