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

Unified Diff: chrome/browser/ui/webui/options/certificate_manager_browsertest.js

Issue 209263002: Merge 257570 "Handle cases when user cert database has NULL slots" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1847/src/
Patch Set: Created 6 years, 9 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
Index: chrome/browser/ui/webui/options/certificate_manager_browsertest.js
===================================================================
--- chrome/browser/ui/webui/options/certificate_manager_browsertest.js (revision 258711)
+++ chrome/browser/ui/webui/options/certificate_manager_browsertest.js (working copy)
@@ -94,9 +94,18 @@
Mock4JS.verifyAllMocks();
+ // If user database is not available, import buttons should be disabled.
+ CertificateManager.onModelReady(false /* userDbAvailable*/,
+ false /* tpmAvailable */);
+
+ expectTrue($('personalCertsTab-import').disabled);
+ expectTrue($('serverCertsTab-import').disabled);
+ expectTrue($('caCertsTab-import').disabled);
+
// Once we get the onModelReady call, the import buttons should be enabled,
// others should still be disabled.
- CertificateManager.onModelReady(false /* tpm_available */);
+ CertificateManager.onModelReady(true /* userDbAvailable*/,
+ false /* tpmAvailable */);
expectTrue($('personalCertsTab-view').disabled);
expectTrue($('personalCertsTab-backup').disabled);
@@ -122,7 +131,8 @@
// present.
if (this.isChromeOS) {
expectTrue($('personalCertsTab-import-and-bind').disabled);
- CertificateManager.onModelReady(true /* tpm_available */);
+ CertificateManager.onModelReady(true /* userDbAvailable*/,
+ true /* tpmAvailable */);
expectFalse($('personalCertsTab-import-and-bind').disabled);
}
});
@@ -141,10 +151,11 @@
preLoad: function() {
CertificateManagerWebUIBaseTest.prototype.preLoad.call(this);
- var tpm_available = this.isChromeOS;
+ var tpmAvailable = this.isChromeOS;
+ var userDbAvailable = true;
this.mockHandler.expects(once()).populateCertificateManager().will(
callFunction(function() {
- CertificateManager.onModelReady(tpm_available);
+ CertificateManager.onModelReady(userDbAvailable, tpmAvailable);
[['personalCertsTab-tree',
[{'id': 'o1',

Powered by Google App Engine
This is Rietveld 408576698