| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Warning: this file will not be compiled for ChromeOS because the test | 5 // Warning: this file will not be compiled for ChromeOS because the test |
| 6 // PolicyMakeDefaultBrowserTest is not valid for this platform. | 6 // PolicyMakeDefaultBrowserTest is not valid for this platform. |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 switches::kMakeDefaultBrowser); | 28 switches::kMakeDefaultBrowser); |
| 29 EXPECT_CALL(provider_, IsInitializationComplete(testing::_)) | 29 EXPECT_CALL(provider_, IsInitializationComplete(testing::_)) |
| 30 .WillRepeatedly(testing::Return(true)); | 30 .WillRepeatedly(testing::Return(true)); |
| 31 | 31 |
| 32 policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); | 32 policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); |
| 33 | 33 |
| 34 policy::PolicyMap values; | 34 policy::PolicyMap values; |
| 35 values.Set(policy::key::kDefaultBrowserSettingEnabled, | 35 values.Set(policy::key::kDefaultBrowserSettingEnabled, |
| 36 policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_MACHINE, | 36 policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_MACHINE, |
| 37 policy::POLICY_SOURCE_CLOUD, | 37 policy::POLICY_SOURCE_CLOUD, |
| 38 base::WrapUnique(new base::FundamentalValue(false)), nullptr); | 38 base::MakeUnique<base::FundamentalValue>(false), nullptr); |
| 39 provider_.UpdateChromePolicy(values); | 39 provider_.UpdateChromePolicy(values); |
| 40 } | 40 } |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 policy::MockConfigurationPolicyProvider provider_; | 43 policy::MockConfigurationPolicyProvider provider_; |
| 44 DISALLOW_COPY_AND_ASSIGN(PolicyMakeDefaultBrowserTest); | 44 DISALLOW_COPY_AND_ASSIGN(PolicyMakeDefaultBrowserTest); |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 IN_PROC_BROWSER_TEST_F(PolicyMakeDefaultBrowserTest, MakeDefaultDisabled) { | 47 IN_PROC_BROWSER_TEST_F(PolicyMakeDefaultBrowserTest, MakeDefaultDisabled) { |
| 48 } | 48 } |
| OLD | NEW |