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 #include <openssl/evp.h> | 5 #include <openssl/evp.h> |
6 #include <openssl/rsa.h> | 6 #include <openssl/rsa.h> |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 | 10 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // certificate selection dialog. | 138 // certificate selection dialog. |
139 const std::string autoselect_pattern = | 139 const std::string autoselect_pattern = |
140 "{\"pattern\": \"*\", \"filter\": {\"ISSUER\": {\"CN\": \"root\"}}}"; | 140 "{\"pattern\": \"*\", \"filter\": {\"ISSUER\": {\"CN\": \"root\"}}}"; |
141 | 141 |
142 scoped_ptr<base::ListValue> autoselect_policy(new base::ListValue); | 142 scoped_ptr<base::ListValue> autoselect_policy(new base::ListValue); |
143 autoselect_policy->AppendString(autoselect_pattern); | 143 autoselect_policy->AppendString(autoselect_pattern); |
144 | 144 |
145 policy::PolicyMap policy; | 145 policy::PolicyMap policy; |
146 policy.Set(policy::key::kAutoSelectCertificateForUrls, | 146 policy.Set(policy::key::kAutoSelectCertificateForUrls, |
147 policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, | 147 policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, |
148 policy::POLICY_SOURCE_CLOUD, autoselect_policy.release(), | 148 autoselect_policy.release(), nullptr); |
149 nullptr); | |
150 provider_.UpdateChromePolicy(policy); | 149 provider_.UpdateChromePolicy(policy); |
151 | 150 |
152 content::RunAllPendingInMessageLoop(); | 151 content::RunAllPendingInMessageLoop(); |
153 } | 152 } |
154 | 153 |
155 protected: | 154 protected: |
156 policy::MockConfigurationPolicyProvider provider_; | 155 policy::MockConfigurationPolicyProvider provider_; |
157 }; | 156 }; |
158 | 157 |
159 } // namespace | 158 } // namespace |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 base::RunLoop run_loop; | 255 base::RunLoop run_loop; |
257 const std::string code = "replyWithSignatureSecondTime();"; | 256 const std::string code = "replyWithSignatureSecondTime();"; |
258 bool result = false; | 257 bool result = false; |
259 extension_contents->GetMainFrame()->ExecuteJavaScriptForTests( | 258 extension_contents->GetMainFrame()->ExecuteJavaScriptForTests( |
260 base::ASCIIToUTF16(code), | 259 base::ASCIIToUTF16(code), |
261 base::Bind(&StoreBool, &result, run_loop.QuitClosure())); | 260 base::Bind(&StoreBool, &result, run_loop.QuitClosure())); |
262 run_loop.Run(); | 261 run_loop.Run(); |
263 EXPECT_TRUE(result); | 262 EXPECT_TRUE(result); |
264 } | 263 } |
265 } | 264 } |
OLD | NEW |