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

Side by Side Diff: chrome/browser/ui/webui/options/certificate_manager_browsertest.cc

Issue 20130002: Call crypto::InitializeTPMToken on the IO thread (Take 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/settings/device_settings_service.cc ('k') | chromeos/cert_loader.h » ('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 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/callback.h" 5 #include "base/callback.h"
6 #include "base/values.h" 6 #include "base/values.h"
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/policy/browser_policy_connector.h" 8 #include "chrome/browser/policy/browser_policy_connector.h"
9 #include "chrome/browser/policy/external_data_fetcher.h" 9 #include "chrome/browser/policy/external_data_fetcher.h"
10 #include "chrome/browser/policy/mock_configuration_policy_provider.h" 10 #include "chrome/browser/policy/mock_configuration_policy_provider.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #if defined(OS_CHROMEOS) 49 #if defined(OS_CHROMEOS)
50 Profile* profile = browser()->profile(); 50 Profile* profile = browser()->profile();
51 policy::ProfilePolicyConnector* connector = 51 policy::ProfilePolicyConnector* connector =
52 policy::ProfilePolicyConnectorFactory::GetForProfile(profile); 52 policy::ProfilePolicyConnectorFactory::GetForProfile(profile);
53 53
54 // Enable web trust certs from policy. 54 // Enable web trust certs from policy.
55 g_browser_process->browser_policy_connector()-> 55 g_browser_process->browser_policy_connector()->
56 network_configuration_updater()->SetUserPolicyService( 56 network_configuration_updater()->SetUserPolicyService(
57 true, "", connector->policy_service()); 57 true, "", connector->policy_service());
58 #endif 58 #endif
59 content::RunAllPendingInMessageLoop();
59 } 60 }
60 61
61 #if defined(OS_CHROMEOS) 62 #if defined(OS_CHROMEOS)
62 void LoadONCPolicy(const std::string& filename) { 63 void LoadONCPolicy(const std::string& filename) {
63 const std::string& user_policy_blob = 64 const std::string& user_policy_blob =
64 chromeos::onc::test_utils::ReadTestData(filename); 65 chromeos::onc::test_utils::ReadTestData(filename);
65 policy::PolicyMap policy; 66 policy::PolicyMap policy;
66 policy.Set(policy::key::kOpenNetworkConfiguration, 67 policy.Set(policy::key::kOpenNetworkConfiguration,
67 policy::POLICY_LEVEL_MANDATORY, 68 policy::POLICY_LEVEL_MANDATORY,
68 policy::POLICY_SCOPE_USER, 69 policy::POLICY_SCOPE_USER,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // managed setting indicator (only on Chrome OS). 113 // managed setting indicator (only on Chrome OS).
113 IN_PROC_BROWSER_TEST_F(CertificateManagerBrowserTest, 114 IN_PROC_BROWSER_TEST_F(CertificateManagerBrowserTest,
114 PolicyCertificateWithWebTrustHasIndicator) { 115 PolicyCertificateWithWebTrustHasIndicator) {
115 LoadONCPolicy("certificate-web-authority.onc"); 116 LoadONCPolicy("certificate-web-authority.onc");
116 NavigateToSettings(); 117 NavigateToSettings();
117 ClickElement("#certificatesManageButton"); 118 ClickElement("#certificatesManageButton");
118 ClickElement("#ca-certs-nav-tab"); 119 ClickElement("#ca-certs-nav-tab");
119 EXPECT_TRUE(HasElement(".cert-policy")); 120 EXPECT_TRUE(HasElement(".cert-policy"));
120 } 121 }
121 #endif 122 #endif
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/settings/device_settings_service.cc ('k') | chromeos/cert_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698