bug 1284946 - fix dialog parameter passing in browser_certViewer.js r=Cykesiopka
authorDavid Keeler <dkeeler@mozilla.com>
Thu, 07 Jul 2016 11:14:17 -0700
changeset 305430 595bfede9d26e9dba03495fdcf29d4423a996146
parent 305429 de179cfc917a5b747c1a7559ad08c233e8c419f8
child 305431 3d09e38954064b41dbc0a9387b5c5a205bf21e15
push id30649
push userdkeeler@mozilla.com
push dateMon, 18 Jul 2016 16:43:47 +0000
treeherderautoland@3d09e3895406 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCykesiopka
bugs1284946, 1217602
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1284946 - fix dialog parameter passing in browser_certViewer.js r=Cykesiopka The changes in bug 1217602 missed that browser_certViewer.js should have been updated to use a nsIDialogParamBlock instead of a (mock) nsIPKIParamBlock. "Luckily" the test harness completely ignored the errors resulting from this oversight. MozReview-Commit-ID: JlA62L5PPW8
security/manager/ssl/tests/mochitest/browser/browser_certViewer.js
--- a/security/manager/ssl/tests/mochitest/browser/browser_certViewer.js
+++ b/security/manager/ssl/tests/mochitest/browser/browser_certViewer.js
@@ -24,21 +24,17 @@ function test() {
   let certdb = Cc["@mozilla.org/security/x509certdb;1"]
                  .getService(Ci.nsIX509CertDB);
   let certList = certdb.getCerts();
   let enumerator = certList.getEnumerator();
   ok(enumerator.hasMoreElements(), "we have at least one certificate");
   let cert = enumerator.getNext().QueryInterface(Ci.nsIX509Cert);
   ok(cert, "found a certificate to look at");
   info("looking at certificate with nickname " + cert.nickname);
-  let arg = {
-    QueryInterface: function() {
-      return this;
-    },
-    getISupportAtIndex: function() {
-      return this.cert;
-    },
-    cert: cert
-  };
+  let array = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
+  array.appendElement(cert, false);
+  let params = Cc["@mozilla.org/embedcomp/dialogparam;1"]
+                 .createInstance(Ci.nsIDialogParamBlock);
+  params.objects = array;
   gBugWindow = window.openDialog("chrome://pippki/content/certViewer.xul",
-                                 "", "", arg);
+                                 "", "", params);
   gBugWindow.addEventListener("load", onLoad);
 }