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

Side by Side 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 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 'use strict'; 5 'use strict';
6 6
7 var systemTokenEnabled = (location.search.indexOf("systemTokenEnabled") != -1); 7 var systemTokenEnabled = (location.search.indexOf("systemTokenEnabled") != -1);
8 var selectedTestSuite = location.hash.slice(1); 8 var selectedTestSuite = location.hash.slice(1);
9 console.log('[SELECTED TEST SUITE] ' + selectedTestSuite + 9 console.log('[SELECTED TEST SUITE] ' + selectedTestSuite +
10 ', systemTokenEnable ' + systemTokenEnabled); 10 ', systemTokenEnable ' + systemTokenEnabled);
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 }, 582 },
583 583
584 managedProfile: function() { 584 managedProfile: function() {
585 var tests = [ 585 var tests = [
586 // If the profile is managed, the user cannot grant permissions for any 586 // If the profile is managed, the user cannot grant permissions for any
587 // certificates. 587 // certificates.
588 testInteractiveSelectNoCerts 588 testInteractiveSelectNoCerts
589 ]; 589 ];
590 chrome.test.runTests(tests); 590 chrome.test.runTests(tests);
591 }, 591 },
592
593 corporateKeyWithoutPermissionTests: function() {
594 var tests = [
595 // Directly trying to sign must fail
596 testSignClient1Fails,
597
598 // Interactively selecting must not show any cert to the user.
599 testInteractiveSelectNoCerts,
600 ];
601 chrome.test.runTests(tests);
602 },
603
604 corporateKeyWithPermissionTests: function() {
605 var tests = [
606 // The extension has non-interactive access to all corporate keys, even
607 // without previous additional consent of the user.
608 testSignSha1Client1,
609
610 // Interactively selecting for client_1 will work as well.
611 testInteractiveSelectClient1,
612 ];
613 chrome.test.runTests(tests);
614 },
615
616 policyDoesGrantAccessToNonCorporateKey: function() {
617 // The permission from policy must not affect usage of non-corproate keys.
618 var tests = [
619 // Attempts to sign must fail.
620 testSignClient1Fails,
621
622 // Interactive selection must not prompt the user and not return any
623 // certificate.
624 testInteractiveSelectNoCerts,
625 ];
626 chrome.test.runTests(tests);
627 },
628
592 }; 629 };
593 630
594 setUp(testSuites[selectedTestSuite]); 631 setUp(testSuites[selectedTestSuite]);
OLDNEW
« 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