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

Side by Side Diff: chrome/browser/ui/webui/options/certificate_manager_browsertest.js

Issue 470503002: Fix closing the Alert overlay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/webui/resources/js/cr/ui/page_manager/page_manager.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 /** 9 /**
10 * TestFixture for certificate manager WebUI testing. 10 * TestFixture for certificate manager WebUI testing.
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 Mock4JS.verifyAllMocks(); 229 Mock4JS.verifyAllMocks();
230 230
231 this.mockHandler.expects(once()).deleteCertificate(['c1']).will(callFunction( 231 this.mockHandler.expects(once()).deleteCertificate(['c1']).will(callFunction(
232 function() { 232 function() {
233 CertificateManager.onPopulateTree(['personalCertsTab-tree', []]); 233 CertificateManager.onPopulateTree(['personalCertsTab-tree', []]);
234 })); 234 }));
235 235
236 // Click on the delete button. 236 // Click on the delete button.
237 $('personalCertsTab-delete').click(); 237 $('personalCertsTab-delete').click();
238
239 // Click on the cancel button to verify the confirmation overlay closes.
240 $('alertOverlayCancel').click();
241 expectTrue($('alertOverlay').parentNode.classList.contains('transparent'));
242
243 // Click on the delete button.
244 $('personalCertsTab-delete').click();
245
238 // Click on the ok button in the confirmation overlay. 246 // Click on the ok button in the confirmation overlay.
239 $('alertOverlayOk').click(); 247 $('alertOverlayOk').click();
248 expectTrue($('alertOverlay').parentNode.classList.contains('transparent'));
240 249
241 // Context sensitive buttons should be disabled. 250 // Context sensitive buttons should be disabled.
242 expectTrue($('personalCertsTab-view').disabled); 251 expectTrue($('personalCertsTab-view').disabled);
243 expectTrue($('personalCertsTab-backup').disabled); 252 expectTrue($('personalCertsTab-backup').disabled);
244 expectTrue($('personalCertsTab-delete').disabled); 253 expectTrue($('personalCertsTab-delete').disabled);
245 expectFalse($('personalCertsTab-import').disabled); 254 expectFalse($('personalCertsTab-import').disabled);
246 if (this.isChromeOS) 255 if (this.isChromeOS)
247 expectFalse($('personalCertsTab-import-and-bind').disabled); 256 expectFalse($('personalCertsTab-import-and-bind').disabled);
248 // Tree should be empty. 257 // Tree should be empty.
249 expectTrue(personalCerts.querySelector('div.tree-item') === null); 258 expectTrue(personalCerts.querySelector('div.tree-item') === null);
(...skipping 21 matching lines...) Expand all
271 // edit and delete buttons should be disabled. 280 // edit and delete buttons should be disabled.
272 var cert1 = certs[1]; 281 var cert1 = certs[1];
273 expectEquals('ca_cert1', cert1.data.name); 282 expectEquals('ca_cert1', cert1.data.name);
274 expectNotEquals(null, cert1.querySelector('.cert-policy')); 283 expectNotEquals(null, cert1.querySelector('.cert-policy'));
275 cert1.click(); 284 cert1.click();
276 expectTrue($('caCertsTab-edit').disabled); 285 expectTrue($('caCertsTab-edit').disabled);
277 expectTrue($('caCertsTab-delete').disabled); 286 expectTrue($('caCertsTab-delete').disabled);
278 }); 287 });
279 288
280 GEN('#endif // defined(USE_NSS)'); 289 GEN('#endif // defined(USE_NSS)');
OLDNEW
« no previous file with comments | « no previous file | ui/webui/resources/js/cr/ui/page_manager/page_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698