OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 cr.define('certificate_manager_page', function() { | 5 cr.define('certificate_manager_page', function() { |
6 /** | 6 /** |
7 * A test version of CertificatesBrowserProxy. Provides helper methods | 7 * A test version of CertificatesBrowserProxy. Provides helper methods |
8 * for allowing tests to know when a method was called, as well as | 8 * for allowing tests to know when a method was called, as well as |
9 * specifying mock responses. | 9 * specifying mock responses. |
10 * | 10 * |
11 * @constructor | 11 * @constructor |
12 * @implements {settings.CertificatesBrowserProxy} | 12 * @implements {settings.CertificatesBrowserProxy} |
13 * @extends {settings.TestBrowserProxy} | 13 * @extends {TestBrowserProxy} |
14 */ | 14 */ |
15 var TestCertificatesBrowserProxy = function() { | 15 var TestCertificatesBrowserProxy = function() { |
16 settings.TestBrowserProxy.call(this, [ | 16 TestBrowserProxy.call(this, [ |
17 'deleteCertificate', | 17 'deleteCertificate', |
18 'editCaCertificateTrust', | 18 'editCaCertificateTrust', |
19 'exportCertificate', | 19 'exportCertificate', |
20 'exportPersonalCertificate', | 20 'exportPersonalCertificate', |
21 'exportPersonalCertificatePasswordSelected', | 21 'exportPersonalCertificatePasswordSelected', |
22 'getCaCertificateTrust', | 22 'getCaCertificateTrust', |
23 'importCaCertificate', | 23 'importCaCertificate', |
24 'importCaCertificateTrustSelected', | 24 'importCaCertificateTrustSelected', |
25 'importPersonalCertificate', | 25 'importPersonalCertificate', |
26 'importPersonalCertificatePasswordSelected', | 26 'importPersonalCertificatePasswordSelected', |
27 'importServerCertificate', | 27 'importServerCertificate', |
28 'refreshCertificates', | 28 'refreshCertificates', |
29 'viewCertificate', | 29 'viewCertificate', |
30 ]); | 30 ]); |
31 | 31 |
32 /** @private {!CaTrustInfo} */ | 32 /** @private {!CaTrustInfo} */ |
33 this.caTrustInfo_ = {ssl: true, email: true, objSign: true}; | 33 this.caTrustInfo_ = {ssl: true, email: true, objSign: true}; |
34 | 34 |
35 /** @private {?CertificatesError} */ | 35 /** @private {?CertificatesError} */ |
36 this.certificatesError_ = null; | 36 this.certificatesError_ = null; |
37 }; | 37 }; |
38 | 38 |
39 TestCertificatesBrowserProxy.prototype = { | 39 TestCertificatesBrowserProxy.prototype = { |
40 __proto__: settings.TestBrowserProxy.prototype, | 40 __proto__: TestBrowserProxy.prototype, |
41 | 41 |
42 /** | 42 /** |
43 * @param {!CaTrustInfo} caTrustInfo | 43 * @param {!CaTrustInfo} caTrustInfo |
44 */ | 44 */ |
45 setCaCertificateTrust: function(caTrustInfo) { | 45 setCaCertificateTrust: function(caTrustInfo) { |
46 this.caTrustInfo_ = caTrustInfo; | 46 this.caTrustInfo_ = caTrustInfo; |
47 }, | 47 }, |
48 | 48 |
49 /** @override */ | 49 /** @override */ |
50 getCaCertificateTrust: function(id) { | 50 getCaCertificateTrust: function(id) { |
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 registerCaTrustEditDialogTests(); | 860 registerCaTrustEditDialogTests(); |
861 registerDeleteDialogTests(); | 861 registerDeleteDialogTests(); |
862 registerPasswordEncryptDialogTests(); | 862 registerPasswordEncryptDialogTests(); |
863 registerPasswordDecryptDialogTests(); | 863 registerPasswordDecryptDialogTests(); |
864 registerPageTests(); | 864 registerPageTests(); |
865 registerCertificateSubentryTests(); | 865 registerCertificateSubentryTests(); |
866 registerCertificateListTests(); | 866 registerCertificateListTests(); |
867 }, | 867 }, |
868 }; | 868 }; |
869 }); | 869 }); |
OLD | NEW |