Bug 967299: Fix async/sync issue in test_ev_certs.js, r=keeler, a=test-only
authorBrian Smith <brian@briansmith.org>
Mon, 03 Feb 2014 16:05:33 -0800
changeset 182674 c9d64c8f4710a71b72566de0b79a6a0de8fcd3af
parent 182673 560edec8482e211a13d27fde95ebb52951aac339
child 182675 8e82d0db50ffc4114a78dc581dd5cfa830915114
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskeeler, test-only
bugs967299
milestone29.0a2
Bug 967299: Fix async/sync issue in test_ev_certs.js, r=keeler, a=test-only
security/manager/ssl/tests/unit/test_ev_certs.js
--- a/security/manager/ssl/tests/unit/test_ev_certs.js
+++ b/security/manager/ssl/tests/unit/test_ev_certs.js
@@ -222,26 +222,25 @@ add_test(function() {
 
 // Test the EV continues to work with flags after successful EV verification
 add_test(function() {
   clearOCSPCache();
   let ocspResponder = start_ocsp_responder(
                         isDebugBuild ? ["int-ev-valid", "ev-valid"]
                                      : ["ev-valid"]);
   check_ee_for_ev("ev-valid", isDebugBuild);
-  ocspResponder.stop(run_next_test);
+  ocspResponder.stop(function () {
+    // without net it must be able to EV verify
+    let failingOcspResponder = failingOCSPResponder();
+    let cert = certdb.findCertByNickname(null, "ev-valid");
+    let hasEVPolicy = {};
+    let verifiedChain = {};
+    let flags = Ci.nsIX509CertDB.FLAG_LOCAL_ONLY |
+                Ci.nsIX509CertDB.FLAG_MUST_BE_EV;
 
-  // without net it must be able to EV verify
-  let failingOcspResponder = failingOCSPResponder();
-  let cert = certdb.findCertByNickname(null, "ev-valid");
-  let hasEVPolicy = {};
-  let verifiedChain = {};
-  let flags = Ci.nsIX509CertDB.FLAG_LOCAL_ONLY |
-              Ci.nsIX509CertDB.FLAG_MUST_BE_EV;
-
-  let error = certdb.verifyCertNow(cert, certificateUsageSSLServer,
-                                   flags, verifiedChain, hasEVPolicy);
-  do_check_eq(hasEVPolicy.value, isDebugBuild);
-  do_check_eq(error, isDebugBuild ? 0 : SEC_ERROR_EXTENSION_NOT_FOUND);
-  failingOcspResponder.stop(run_next_test);
-
+    let error = certdb.verifyCertNow(cert, certificateUsageSSLServer,
+                                     flags, verifiedChain, hasEVPolicy);
+    do_check_eq(hasEVPolicy.value, isDebugBuild);
+    do_check_eq(error, isDebugBuild ? 0 : SEC_ERROR_EXTENSION_NOT_FOUND);
+    failingOcspResponder.stop(run_next_test);
+  });
 });