OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/values.h" | 5 #include "base/values.h" |
6 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 6 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
7 #include "chrome/browser/ui/webui/options/options_ui_browsertest.h" | 7 #include "chrome/browser/ui/webui/options/options_ui_browsertest.h" |
8 #include "components/policy/core/browser/browser_policy_connector.h" | 8 #include "components/policy/core/browser/browser_policy_connector.h" |
9 #include "components/policy/core/common/external_data_fetcher.h" | 9 #include "components/policy/core/common/external_data_fetcher.h" |
10 #include "components/policy/core/common/mock_configuration_policy_provider.h" | 10 #include "components/policy/core/common/mock_configuration_policy_provider.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 using testing::Return; | 26 using testing::Return; |
27 using testing::_; | 27 using testing::_; |
28 | 28 |
29 class CertificateManagerBrowserTest : public options::OptionsUIBrowserTest { | 29 class CertificateManagerBrowserTest : public options::OptionsUIBrowserTest { |
30 public: | 30 public: |
31 CertificateManagerBrowserTest() {} | 31 CertificateManagerBrowserTest() {} |
32 virtual ~CertificateManagerBrowserTest() {} | 32 virtual ~CertificateManagerBrowserTest() {} |
33 | 33 |
34 protected: | 34 protected: |
35 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 35 virtual void SetUpInProcessBrowserTestFixture() override { |
36 #if defined(OS_CHROMEOS) | 36 #if defined(OS_CHROMEOS) |
37 device_policy_test_helper_.MarkAsEnterpriseOwned(); | 37 device_policy_test_helper_.MarkAsEnterpriseOwned(); |
38 #endif | 38 #endif |
39 // Setup the policy provider for injecting certs through ONC policy. | 39 // Setup the policy provider for injecting certs through ONC policy. |
40 EXPECT_CALL(provider_, IsInitializationComplete(_)) | 40 EXPECT_CALL(provider_, IsInitializationComplete(_)) |
41 .WillRepeatedly(Return(true)); | 41 .WillRepeatedly(Return(true)); |
42 policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); | 42 policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); |
43 } | 43 } |
44 | 44 |
45 #if defined(OS_CHROMEOS) | 45 #if defined(OS_CHROMEOS) |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // managed setting indicator (only on Chrome OS). | 97 // managed setting indicator (only on Chrome OS). |
98 IN_PROC_BROWSER_TEST_F(CertificateManagerBrowserTest, | 98 IN_PROC_BROWSER_TEST_F(CertificateManagerBrowserTest, |
99 PolicyCertificateWithWebTrustHasIndicator) { | 99 PolicyCertificateWithWebTrustHasIndicator) { |
100 LoadONCPolicy("certificate-web-authority.onc"); | 100 LoadONCPolicy("certificate-web-authority.onc"); |
101 NavigateToSettings(); | 101 NavigateToSettings(); |
102 ClickElement("#certificatesManageButton"); | 102 ClickElement("#certificatesManageButton"); |
103 ClickElement("#ca-certs-nav-tab"); | 103 ClickElement("#ca-certs-nav-tab"); |
104 EXPECT_TRUE(HasElement(".cert-policy")); | 104 EXPECT_TRUE(HasElement(".cert-policy")); |
105 } | 105 } |
106 #endif | 106 #endif |
OLD | NEW |