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

Unified Diff: chrome/test/data/extensions/api_test/platform_keys/basic.js

Issue 1150373002: platformKeys: Add policy and corporate key tagging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@key_perm
Patch Set: Rebased. Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/pref_names.cc ('k') | chrome/test/data/extensions/api_test/platform_keys_genkey/main.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/platform_keys/basic.js
diff --git a/chrome/test/data/extensions/api_test/platform_keys/basic.js b/chrome/test/data/extensions/api_test/platform_keys/basic.js
index f8d97c13e157b3ddfd7274bd82cf7c792dad5eb4..6241908cdde0ca88a19af3a47976bd9aa3f94001 100644
--- a/chrome/test/data/extensions/api_test/platform_keys/basic.js
+++ b/chrome/test/data/extensions/api_test/platform_keys/basic.js
@@ -589,6 +589,43 @@ var testSuites = {
];
chrome.test.runTests(tests);
},
+
+ corporateKeyWithoutPermissionTests: function() {
+ var tests = [
+ // Directly trying to sign must fail
+ testSignClient1Fails,
+
+ // Interactively selecting must not show any cert to the user.
+ testInteractiveSelectNoCerts,
+ ];
+ chrome.test.runTests(tests);
+ },
+
+ corporateKeyWithPermissionTests: function() {
+ var tests = [
+ // The extension has non-interactive access to all corporate keys, even
+ // without previous additional consent of the user.
+ testSignSha1Client1,
+
+ // Interactively selecting for client_1 will work as well.
+ testInteractiveSelectClient1,
+ ];
+ chrome.test.runTests(tests);
+ },
+
+ policyDoesGrantAccessToNonCorporateKey: function() {
+ // The permission from policy must not affect usage of non-corproate keys.
+ var tests = [
+ // Attempts to sign must fail.
+ testSignClient1Fails,
+
+ // Interactive selection must not prompt the user and not return any
+ // certificate.
+ testInteractiveSelectNoCerts,
+ ];
+ chrome.test.runTests(tests);
+ },
+
};
setUp(testSuites[selectedTestSuite]);
« no previous file with comments | « chrome/common/pref_names.cc ('k') | chrome/test/data/extensions/api_test/platform_keys_genkey/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698