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

Side by Side Diff: chrome/browser/extensions/api/certificate_provider/certificate_provider_apitest.cc

Issue 1304843004: Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed another test. Created 5 years, 3 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
OLDNEW
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
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 autoselect_policy.release(), nullptr); 148 policy::POLICY_SOURCE_CLOUD, autoselect_policy.release(),
149 nullptr);
149 provider_.UpdateChromePolicy(policy); 150 provider_.UpdateChromePolicy(policy);
150 151
151 content::RunAllPendingInMessageLoop(); 152 content::RunAllPendingInMessageLoop();
152 } 153 }
153 154
154 protected: 155 protected:
155 policy::MockConfigurationPolicyProvider provider_; 156 policy::MockConfigurationPolicyProvider provider_;
156 }; 157 };
157 158
158 } // namespace 159 } // namespace
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 base::RunLoop run_loop; 256 base::RunLoop run_loop;
256 const std::string code = "replyWithSignatureSecondTime();"; 257 const std::string code = "replyWithSignatureSecondTime();";
257 bool result = false; 258 bool result = false;
258 extension_contents->GetMainFrame()->ExecuteJavaScriptForTests( 259 extension_contents->GetMainFrame()->ExecuteJavaScriptForTests(
259 base::ASCIIToUTF16(code), 260 base::ASCIIToUTF16(code),
260 base::Bind(&StoreBool, &result, run_loop.QuitClosure())); 261 base::Bind(&StoreBool, &result, run_loop.QuitClosure()));
261 run_loop.Run(); 262 run_loop.Run();
262 EXPECT_TRUE(result); 263 EXPECT_TRUE(result);
263 } 264 }
264 } 265 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698