Bug 1317046 - avoid using todo_is in browser_use_counters.js; r=dholbert
authorNathan Froyd <froydnj@mozilla.com>
Mon, 05 Dec 2016 01:24:18 -0500
changeset 325284 590c70d2662affa6021df4e32c7814977fcb4dd0
parent 325283 df12d4af96342013b1e29ddcaf07bd34c73001e7
child 325285 8103c612b79c2587ea4ca1b0a9f9f82db4b185b8
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersdholbert
bugs1317046
milestone53.0a1
Bug 1317046 - avoid using todo_is in browser_use_counters.js; r=dholbert Using todo_is can cause spurious UNEXPECTED-PASSes.
dom/base/test/browser_use_counters.js
--- a/dom/base/test/browser_use_counters.js
+++ b/dom/base/test/browser_use_counters.js
@@ -293,17 +293,19 @@ var check_use_counter_direct = async fun
   // destroyed, which might not have happened yet due to GC/CC effects, etc.
   // Try to force document destruction.
   await waitForDestroyedDocuments();
 
   // Grab histograms again and compare.
   let [histogram_page_after, histogram_document_after,
        histogram_docs_after, histogram_toplevel_docs_after] =
       await grabHistogramsFromContent(use_counter_middlefix, histogram_page_before);
-  (xfail ? todo_is : is)(histogram_page_after, histogram_page_before + 1,
-                         "page counts for " + use_counter_middlefix + " after are correct");
-  (xfail ? todo_is : is)(histogram_document_after, histogram_document_before + 1,
-                         "document counts for " + use_counter_middlefix + " after are correct");
+  if (!xfail) {
+    is(histogram_page_after, histogram_page_before + 1,
+       "page counts for " + use_counter_middlefix + " after are correct");
+    is(histogram_document_after, histogram_document_before + 1,
+       "document counts for " + use_counter_middlefix + " after are correct");
+  }
   ok(histogram_toplevel_docs_after >= histogram_toplevel_docs_before + 1,
      "top level document counts are correct");
   ok(histogram_docs_after >= histogram_docs_before + 1,
      "document counts are correct");
 };