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