Chromium Code Reviews| Index: chrome/browser/policy/policy_browsertest.cc |
| diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc |
| index ad7e48a26feb825b685b690869c25a3ec362de75..e82b921ffeb84078a03dae5f2cfe32f2b246a1e8 100644 |
| --- a/chrome/browser/policy/policy_browsertest.cc |
| +++ b/chrome/browser/policy/policy_browsertest.cc |
| @@ -1199,9 +1199,8 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ForceGoogleSafeSearch) { |
| safe_search == 0 // ForceGoogleSafeSearch |
| ? nullptr |
| : base::MakeUnique<base::FundamentalValue>(safe_search == 1), |
| - nullptr, // ForceYouTubeSafetyMode |
| - nullptr // ForceYouTubeRestrict |
| - ); |
| + nullptr, // ForceYouTubeSafetyMode |
| + nullptr); // ForceYouTubeRestrict |
| // Verify that the safe search pref behaves the way we expect. |
| PrefService* prefs = browser()->profile()->GetPrefs(); |
| @@ -2093,6 +2092,19 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, HomepageLocation) { |
| EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), contents->GetURL()); |
| } |
| +IN_PROC_BROWSER_TEST_F(PolicyTest, NewTabPageLocation) { |
|
pastarmovj
2017/01/19 14:56:21
IIRC this is tested by the policy_test_cases.json
MAD
2017/01/19 16:13:30
Ho! Good point... Thanks!
|
| + // Verifies that the New Tab page can be configured with policies. |
| + PolicyMap policies; |
| + policies.Set(key::kNewTabPageLocation, POLICY_LEVEL_MANDATORY, |
| + POLICY_SCOPE_USER, POLICY_SOURCE_ENTERPRISE_DEFAULT, |
| + base::MakeUnique<base::StringValue>(chrome::kChromeUICreditsURL), |
| + nullptr); |
| + UpdateProviderPolicy(policies); |
| + PrefService* prefs = browser()->profile()->GetPrefs(); |
| + EXPECT_EQ(chrome::kChromeUICreditsURL, |
| + prefs->GetString(prefs::kNewTabPageLocationOverride)); |
| +} |
| + |
| #if defined(OS_MACOSX) && defined(ADDRESS_SANITIZER) |
| // Flaky on ASAN on Mac. See https://crbug.com/674497. |
| #define MAYBE_IncognitoEnabled DISABLED_IncognitoEnabled |