OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Mac and Windows go to native certificate manager, and certificate manager | 5 // Mac and Windows go to native certificate manager, and certificate manager |
6 // isn't implemented if OpenSSL is used. | 6 // isn't implemented if OpenSSL is used. |
7 GEN('#if defined(USE_NSS)'); | 7 GEN('#if defined(USE_NSS)'); |
8 | 8 |
9 // Triggers an issue in v8: http://crbug.com/225325 | |
10 GEN('#if defined(OS_LINUX)'); | |
11 GEN('#define MAYBE_testViewAndDeleteCert DISABLED_testViewAndDeleteCert'); | |
12 GEN('#else'); | |
13 GEN('#define MAYBE_testViewAndDeleteCert testViewAndDeleteCert'); | |
14 GEN('#endif'); | |
15 | |
16 /** | 9 /** |
17 * TestFixture for certificate manager WebUI testing. | 10 * TestFixture for certificate manager WebUI testing. |
18 * @extends {testing.Test} | 11 * @extends {testing.Test} |
19 * @constructor | 12 * @constructor |
20 **/ | 13 **/ |
21 function CertificateManagerWebUIBaseTest() {} | 14 function CertificateManagerWebUIBaseTest() {} |
22 | 15 |
23 CertificateManagerWebUIBaseTest.prototype = { | 16 CertificateManagerWebUIBaseTest.prototype = { |
24 __proto__: testing.Test.prototype, | 17 __proto__: testing.Test.prototype, |
25 | 18 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 129 |
137 if (this.isChromeOS) | 130 if (this.isChromeOS) |
138 this.mockHandler.expects(once()).checkTpmTokenReady().will(callFunction( | 131 this.mockHandler.expects(once()).checkTpmTokenReady().will(callFunction( |
139 function() { | 132 function() { |
140 CertificateManager.onCheckTpmTokenReady(true); | 133 CertificateManager.onCheckTpmTokenReady(true); |
141 })); | 134 })); |
142 }, | 135 }, |
143 }; | 136 }; |
144 | 137 |
145 TEST_F('CertificateManagerWebUITest', | 138 TEST_F('CertificateManagerWebUITest', |
146 'MAYBE_testViewAndDeleteCert', function() { | 139 'testViewAndDeleteCert', function() { |
147 assertEquals(this.browsePreload, document.location.href); | 140 assertEquals(this.browsePreload, document.location.href); |
148 | 141 |
149 this.mockHandler.expects(once()).viewCertificate(['c1']); | 142 this.mockHandler.expects(once()).viewCertificate(['c1']); |
150 | 143 |
151 expectTrue($('personalCertsTab-view').disabled); | 144 expectTrue($('personalCertsTab-view').disabled); |
152 expectTrue($('personalCertsTab-backup').disabled); | 145 expectTrue($('personalCertsTab-backup').disabled); |
153 expectTrue($('personalCertsTab-delete').disabled); | 146 expectTrue($('personalCertsTab-delete').disabled); |
154 expectFalse($('personalCertsTab-import').disabled); | 147 expectFalse($('personalCertsTab-import').disabled); |
155 if (this.isChromeOS) | 148 if (this.isChromeOS) |
156 expectFalse($('personalCertsTab-import-and-bind').disabled); | 149 expectFalse($('personalCertsTab-import-and-bind').disabled); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 expectFalse($('personalCertsTab-import').disabled); | 193 expectFalse($('personalCertsTab-import').disabled); |
201 if (this.isChromeOS) | 194 if (this.isChromeOS) |
202 expectFalse($('personalCertsTab-import-and-bind').disabled); | 195 expectFalse($('personalCertsTab-import-and-bind').disabled); |
203 // Tree should be empty. | 196 // Tree should be empty. |
204 expectTrue(personalCerts.querySelector('div.tree-item') === null); | 197 expectTrue(personalCerts.querySelector('div.tree-item') === null); |
205 }); | 198 }); |
206 | 199 |
207 // TODO(mattm): add more tests. | 200 // TODO(mattm): add more tests. |
208 | 201 |
209 GEN('#endif // defined(USE_NSS)'); | 202 GEN('#endif // defined(USE_NSS)'); |
OLD | NEW |