Bug 1317046 - Avoid using todo_is in browser_use_counters.js. r=dholbert, a=test-only
authorNathan Froyd <froydnj@mozilla.com>
Mon, 05 Dec 2016 01:24:18 -0500
changeset 353014 cf05a9412d74507d07f3c6893141ba43ddb8bbaf
parent 353013 55bfc9ee4482506acbae39d6052e3bfe9f00a0c5
child 353015 12a5aceb1187f5f9ddf64298383ec47d62c8b728
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert, test-only
bugs1317046
milestone52.0a2
Bug 1317046 - Avoid using todo_is in browser_use_counters.js. r=dholbert, a=test-only 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 = Task.asyn
   // destroyed, which might not have happened yet due to GC/CC effects, etc.
   // Try to force document destruction.
   yield waitForDestroyedDocuments();
 
   // Grab histograms again and compare.
   let [histogram_page_after, histogram_document_after,
        histogram_docs_after, histogram_toplevel_docs_after] =
       yield 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");
 });