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

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

Issue 2579013002: Disable flaky incognito-related tests on Mac ASAN. (Closed)
Patch Set: Created 4 years 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/tracing/chrome_tracing_delegate_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 2076 matching lines...) Expand 10 before | Expand all | Expand 10 after
2087 2087
2088 policies.Set(key::kHomepageIsNewTabPage, POLICY_LEVEL_MANDATORY, 2088 policies.Set(key::kHomepageIsNewTabPage, POLICY_LEVEL_MANDATORY,
2089 POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD, 2089 POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
2090 base::MakeUnique<base::FundamentalValue>(true), nullptr); 2090 base::MakeUnique<base::FundamentalValue>(true), nullptr);
2091 UpdateProviderPolicy(policies); 2091 UpdateProviderPolicy(policies);
2092 EXPECT_TRUE(chrome::ExecuteCommand(browser(), IDC_HOME)); 2092 EXPECT_TRUE(chrome::ExecuteCommand(browser(), IDC_HOME));
2093 content::WaitForLoadStop(contents); 2093 content::WaitForLoadStop(contents);
2094 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), contents->GetURL()); 2094 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), contents->GetURL());
2095 } 2095 }
2096 2096
2097 IN_PROC_BROWSER_TEST_F(PolicyTest, IncognitoEnabled) { 2097 #if defined(OS_MACOSX) && defined(ADDRESS_SANITIZER)
2098 // Flaky on ASAN on Mac. See https://crbug.com/674497.
2099 #define MAYBE_IncognitoEnabled DISABLED_IncognitoEnabled
2100 #else
2101 #define MAYBE_IncognitoEnabled IncognitoEnabled
2102 #endif
2103 IN_PROC_BROWSER_TEST_F(PolicyTest, MAYBE_IncognitoEnabled) {
2098 // Verifies that incognito windows can't be opened when disabled by policy. 2104 // Verifies that incognito windows can't be opened when disabled by policy.
2099 2105
2100 const BrowserList* active_browser_list = BrowserList::GetInstance(); 2106 const BrowserList* active_browser_list = BrowserList::GetInstance();
2101 2107
2102 // Disable incognito via policy and verify that incognito windows can't be 2108 // Disable incognito via policy and verify that incognito windows can't be
2103 // opened. 2109 // opened.
2104 EXPECT_EQ(1u, active_browser_list->size()); 2110 EXPECT_EQ(1u, active_browser_list->size());
2105 EXPECT_FALSE(BrowserList::IsIncognitoSessionActive()); 2111 EXPECT_FALSE(BrowserList::IsIncognitoSessionActive());
2106 PolicyMap policies; 2112 PolicyMap policies;
2107 policies.Set(key::kIncognitoEnabled, POLICY_LEVEL_MANDATORY, 2113 policies.Set(key::kIncognitoEnabled, POLICY_LEVEL_MANDATORY,
(...skipping 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after
4320 4326
4321 SetEmptyPolicy(); 4327 SetEmptyPolicy();
4322 // Policy not set. 4328 // Policy not set.
4323 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); 4329 CheckSystemTimezoneAutomaticDetectionPolicyUnset();
4324 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); 4330 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false));
4325 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); 4331 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests());
4326 } 4332 }
4327 #endif // defined(OS_CHROMEOS) 4333 #endif // defined(OS_CHROMEOS)
4328 4334
4329 } // namespace policy 4335 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/tracing/chrome_tracing_delegate_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698