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

Side by Side Diff: chrome/browser/policy/policy_browsertest.cc

Issue 2627363002: Enabling new FRE and launch flow by default on Win 10. (Closed)
Patch Set: ChromeOS Unused Function Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/startup/startup_browser_creator_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 2959 matching lines...) Expand 10 before | Expand all | Expand 10 after
2970 provider_.UpdateChromePolicy(policies); 2970 provider_.UpdateChromePolicy(policies);
2971 // This should restore the tabs opened at PRE_RunTest below. 2971 // This should restore the tabs opened at PRE_RunTest below.
2972 for (size_t i = 0; i < arraysize(kRestoredURLs); ++i) 2972 for (size_t i = 0; i < arraysize(kRestoredURLs); ++i)
2973 expected_urls_.push_back(GURL(kRestoredURLs[i])); 2973 expected_urls_.push_back(GURL(kRestoredURLs[i]));
2974 } 2974 }
2975 2975
2976 std::vector<GURL> expected_urls_; 2976 std::vector<GURL> expected_urls_;
2977 }; 2977 };
2978 2978
2979 IN_PROC_BROWSER_TEST_P(RestoreOnStartupPolicyTest, PRE_RunTest) { 2979 IN_PROC_BROWSER_TEST_P(RestoreOnStartupPolicyTest, PRE_RunTest) {
2980 // Do not show Welcome Page.
2981 browser()->profile()->GetPrefs()->SetBoolean(prefs::kHasSeenWelcomePage,
2982 true);
2983
2984 #if defined(OS_WIN)
2985 // Do not show the Windows 10 promo page.
2986 g_browser_process->local_state()->SetBoolean(prefs::kHasSeenWin10PromoPage,
2987 true);
2988 #endif
2989
2980 // Open some tabs to verify if they are restored after the browser restarts. 2990 // Open some tabs to verify if they are restored after the browser restarts.
2981 // Most policy settings override this, except kPrefValueLast which enforces 2991 // Most policy settings override this, except kPrefValueLast which enforces
2982 // a restore. 2992 // a restore.
2983 ui_test_utils::NavigateToURL(browser(), GURL(kRestoredURLs[0])); 2993 ui_test_utils::NavigateToURL(browser(), GURL(kRestoredURLs[0]));
2984 for (size_t i = 1; i < arraysize(kRestoredURLs); ++i) { 2994 for (size_t i = 1; i < arraysize(kRestoredURLs); ++i) {
2985 content::WindowedNotificationObserver observer( 2995 content::WindowedNotificationObserver observer(
2986 content::NOTIFICATION_LOAD_STOP, 2996 content::NOTIFICATION_LOAD_STOP,
2987 content::NotificationService::AllSources()); 2997 content::NotificationService::AllSources());
2988 chrome::AddSelectedTabWithURL(browser(), GURL(kRestoredURLs[i]), 2998 chrome::AddSelectedTabWithURL(browser(), GURL(kRestoredURLs[i]),
2989 ui::PAGE_TRANSITION_LINK); 2999 ui::PAGE_TRANSITION_LINK);
(...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after
4320 4330
4321 SetEmptyPolicy(); 4331 SetEmptyPolicy();
4322 // Policy not set. 4332 // Policy not set.
4323 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); 4333 CheckSystemTimezoneAutomaticDetectionPolicyUnset();
4324 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); 4334 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false));
4325 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); 4335 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests());
4326 } 4336 }
4327 #endif // defined(OS_CHROMEOS) 4337 #endif // defined(OS_CHROMEOS)
4328 4338
4329 } // namespace policy 4339 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/startup/startup_browser_creator_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698