Bug 404077: Clean up erroneous expectAssertions calls from GC of objects created in a series of tests using showModalDialog.
authorL. David Baron <dbaron@dbaron.org>
Tue, 26 Feb 2013 22:23:08 -0800
changeset 123176 58890b4aadfb11b4073806bd6dbef20a9a086fb0
parent 123175 710f17ddda96eaebaeef1f1c760c16c054a79778
child 123177 4440a63381608848edcc565cee7409c608ce9271
push id1390
push userMs2ger@gmail.com
push dateThu, 28 Feb 2013 17:40:16 +0000
treeherderfx-team@c65d59d33aa8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs404077
milestone22.0a1
Bug 404077: Clean up erroneous expectAssertions calls from GC of objects created in a series of tests using showModalDialog. This will require a little follow-up cleanup.
dom/tests/mochitest/bugs/test_bug406375.html
dom/tests/mochitest/bugs/test_bug411103.html
dom/tests/mochitest/bugs/test_bug414291.html
dom/tests/mochitest/bugs/test_bug427744.html
dom/tests/mochitest/bugs/test_bug42976.html
dom/tests/mochitest/bugs/test_bug430276.html
dom/tests/mochitest/bugs/test_bug437361.html
dom/tests/mochitest/bugs/test_bug440572.html
dom/tests/mochitest/bugs/test_bug456151.html
dom/tests/mochitest/bugs/test_bug458091.html
dom/tests/mochitest/bugs/test_bug459848.html
dom/tests/mochitest/bugs/test_bug465263.html
dom/tests/mochitest/bugs/test_bug479143.html
dom/tests/mochitest/bugs/test_bug484775.html
dom/tests/mochitest/bugs/test_bug492925.html
dom/tests/mochitest/bugs/test_bug49312.html
dom/tests/mochitest/bugs/test_bug495219.html
dom/tests/mochitest/bugs/test_bug504862.html
dom/tests/mochitest/bugs/test_bug529328.html
dom/tests/mochitest/bugs/test_bug531176.html
dom/tests/mochitest/bugs/test_bug531542.html
dom/tests/mochitest/bugs/test_bug534149.html
dom/tests/mochitest/bugs/test_bug541530.html
dom/tests/mochitest/bugs/test_bug545314.html
dom/tests/mochitest/bugs/test_bug548828.html
dom/tests/mochitest/bugs/test_bug562433.html
dom/tests/mochitest/bugs/test_bug563487.html
dom/tests/mochitest/bugs/test_bug583225.html
dom/tests/mochitest/bugs/test_bug585240.html
dom/tests/mochitest/bugs/test_bug585819.html
dom/tests/mochitest/bugs/test_bug593174.html
dom/tests/mochitest/bugs/test_bug597809.html
dom/tests/mochitest/bugs/test_bug61098.html
dom/tests/mochitest/bugs/test_bug612267.html
dom/tests/mochitest/bugs/test_bug620947.html
dom/tests/mochitest/bugs/test_bug622361.html
dom/tests/mochitest/bugs/test_bug633133.html
dom/tests/mochitest/bugs/test_bug641552.html
dom/tests/mochitest/bugs/test_bug642026.html
dom/tests/mochitest/bugs/test_bug648465.html
dom/tests/mochitest/bugs/test_bug664737.html
--- a/dom/tests/mochitest/bugs/test_bug406375.html
+++ b/dom/tests/mochitest/bugs/test_bug406375.html
@@ -13,17 +13,19 @@ https://bugzilla.mozilla.org/show_bug.cg
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(2, 3);
+  SimpleTest.expectAssertions(3);
+} else if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(1);
 }
 
 /** Test for Bug 406375 **/
 
 
 SimpleTest.waitForExplicitFinish();
 
 function runTest() {
--- a/dom/tests/mochitest/bugs/test_bug411103.html
+++ b/dom/tests/mochitest/bugs/test_bug411103.html
@@ -18,20 +18,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 <!-- for good measure... -->
 <iframe src="data:application/xhtml+xml,%3Chtml%20xmlns=%22http://www.w3.org/1999/xhtml%22%3E%3Cbody%3E%3Cp%3EXHTML%3C/p%3E%3C/body%3E%3C/html%3E"
         name="xhtmlWindow"></iframe>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-if (navigator.platform.indexOf("Win") != 0) {
-  SimpleTest.expectAssertions(0, 1);
-}
-
 SimpleTest.waitForExplicitFinish();
 
 /** Test for Bug 411103 **/
 var allNSTests =
   [
    { args: [undefined, undefined] },
    { args: [null, undefined] },
    { args: [undefined, null] },
--- a/dom/tests/mochitest/bugs/test_bug414291.html
+++ b/dom/tests/mochitest/bugs/test_bug414291.html
@@ -7,18 +7,18 @@ https://bugzilla.mozilla.org/show_bug.cg
   <title>Test for Bug 414291</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=414291">Mozilla Bug 414291</a>
 <script class="testbody" type="text/javascript">
 
-if (navigator.platform.indexOf("Linux") == 0) {
-  SimpleTest.expectAssertions(0, 2);
+if (navigator.platform.indexOf("Win") != 0) {
+  SimpleTest.expectAssertions(1);
 }
 
 /** Test for Bug 414291 **/
 
 var result1 = 0;
 var result2 = 0;
 var result3 = 0;
 
--- a/dom/tests/mochitest/bugs/test_bug427744.html
+++ b/dom/tests/mochitest/bugs/test_bug427744.html
@@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=427744">Mozilla Bug 427744</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 2);
-}
-
 /** Test for Bug 427744 **/
 
 var found = false;
 for (var i = 0; i < navigator.plugins.length; i++) {
   if (navigator.plugins[i].name == "Test Plug-in") {
     found = true;
     is(navigator.plugins[i].version, "1.0.0.0", "Should have seen the right version");
   }
--- a/dom/tests/mochitest/bugs/test_bug42976.html
+++ b/dom/tests/mochitest/bugs/test_bug42976.html
@@ -17,20 +17,16 @@ https://bugzilla.mozilla.org/show_bug.cg
     <iframe id=htmlstd src="data:text/html;charset=ISO-8859-3,<!DOCTYPE html><html><body><div></div></body></html>"></iframe>
     <iframe id=textplain src="data:text/plain;charset=ISO-8859-4,asdf%0Azxcv%0A"></iframe>
     <iframe id=xhtmlstd src="data:application/xhtml+xml;charset=ISO-8859-5,<!DOCTYPE html><html xmlns='http://www.w3.org/1999/xhtml'><body><div></div></body></html>"></iframe>
     <iframe id=xmlstd src="data:image/svg+xml;charset=ISO-8859-6,<svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width='300' height='300'><text x='60' y='150' fill='blue'>Hello, World!</text><text x='60' y='250' fill='blue'>Hello, World!</text></svg>"></iframe>
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-if (navigator.platform.indexOf("Win") != 0) {
-  SimpleTest.expectAssertions(0, 1);
-}
-
 SimpleTest.waitForExplicitFinish();
 
 function runTest() {
 
   var iframes = document.getElementsByTagName("iframe");
   for (var i = 1; i < iframes.length; i++) {
     var doc = iframes[i].contentDocument;
     var clonefalse = doc.cloneNode(false);
--- a/dom/tests/mochitest/bugs/test_bug430276.html
+++ b/dom/tests/mochitest/bugs/test_bug430276.html
@@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=430276">Mozilla Bug 430276</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-if (navigator.platform.indexOf("Linux") == 0) {
-  SimpleTest.expectAssertions(0, 1);
-}
-
 /** Test for Bug 430276 **/
 
 function startTest() {
   document.getElementById("testFrame")
     .setAttribute("src", "iframe_bug430276.html");
 }
 
 function nextTest() {
--- a/dom/tests/mochitest/bugs/test_bug437361.html
+++ b/dom/tests/mochitest/bugs/test_bug437361.html
@@ -5,19 +5,19 @@ https://bugzilla.mozilla.org/show_bug.cg
 -->
 <head>
   <title>Test for Bug 437361</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   
   <script class="testbody" type="text/javascript">
 
-if (navigator.platform.indexOf("Win") != 0) {
-  SimpleTest.expectAssertions(0, 3);
-}
+  if (navigator.platform.indexOf("Win") != 0) {
+    SimpleTest.expectAssertions(1);
+  }
 
   /** Test for Bug 437361 **/
 
   function testModalDialogBlockedCleanly() {
     is(true, SpecialPowers.getBoolPref("dom.disable_open_during_load"), "mozprefs sanity check");
     var rv = window.showModalDialog( // should be blocked without exception
       "data:text/html,<html><body onload='close(); returnValue = 1;' /></html>");
     is(rv, null, "Modal dialog opened unexpectedly.");
--- a/dom/tests/mochitest/bugs/test_bug440572.html
+++ b/dom/tests/mochitest/bugs/test_bug440572.html
@@ -8,20 +8,16 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body onload="runtests()">
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=440572">Mozilla Bug 440572</a>
 
 <script class="testbody" type="text/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 3);
-}
-
 /** Test for Bug 440572 **/
 
 var messages = [];
 
 function receiveMessage(e)
 {
   is(e.origin, "http://example.org", "wrong sender!");
   messages.push(e.data);
--- a/dom/tests/mochitest/bugs/test_bug456151.html
+++ b/dom/tests/mochitest/bugs/test_bug456151.html
@@ -14,22 +14,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=456151">Mozilla Bug 456151</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 2);
-} else if (navigator.platform.indexOf("Linux") == 0) {
-  SimpleTest.expectAssertions(0, 1);
-}
-
 /** Test for Bug 456151 **/
 var intercepted = false;
 
 // Set up our new addEventListener
 var proto = HTMLParagraphElement.prototype;
 proto.oldAdd = proto.addEventListener;
 proto.addEventListener = function(ev, list, capt) {
   intercepted = true;
--- a/dom/tests/mochitest/bugs/test_bug458091.html
+++ b/dom/tests/mochitest/bugs/test_bug458091.html
@@ -16,22 +16,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 </div>
 <pre id="test">
 <a id="testlink1" target="_blank" href="javascript:window.opener.finish(sessionStorage['testItem']);window.close();">Javascript Link</a>
 <a id="testlink2" target="_blank" href="bug458091_child.html">HTTP Link</a>
 <a id="testlink3" target="alreadyOpened" href="bug458091_child.html">Target Link</a>
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 3);
-} else if (navigator.platform.indexOf("Linux") == 0) {
-  SimpleTest.expectAssertions(0, 2);
-}
-
 /** Test for Bug 458091 **/
 
 var gTestWin;
 var gRunningTests = 0;
 
 function runNextTest()
 {
   if (gTests.length > 0) {
--- a/dom/tests/mochitest/bugs/test_bug459848.html
+++ b/dom/tests/mochitest/bugs/test_bug459848.html
@@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=459848">Mozilla Bug 459848</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Win") != 0) {
-  SimpleTest.expectAssertions(0, 3);
-}
-
 /** Test for Bug 459848 **/
 
 var ifr1, irf2;
 var doc1, doc2;
 
 function testDocument(d) {
   d.documentElement.setAttribute("onload", "this.setAttribute('didRun', 'true');");
   var e = d.createEvent("Events");
--- a/dom/tests/mochitest/bugs/test_bug465263.html
+++ b/dom/tests/mochitest/bugs/test_bug465263.html
@@ -17,22 +17,16 @@ https://bugzilla.mozilla.org/show_bug.cg
   <iframe src="http://mochi.test:8888"></iframe>
 </p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 3);
-} else if (navigator.platform.indexOf("Linux") == 0) {
-  SimpleTest.expectAssertions(0, 2);
-}
-
 /** Test for Bug 465263 **/
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
   window.frames[0].location.hash = '';
   is(window.frames[0].location.href, "http://mochi.test:8888/#",
      "Should have '#' in href now");
   window.frames[1].location.hash = '#';
   is(window.frames[1].location.href, "http://mochi.test:8888/#",
--- a/dom/tests/mochitest/bugs/test_bug479143.html
+++ b/dom/tests/mochitest/bugs/test_bug479143.html
@@ -11,22 +11,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=479143">Mozilla Bug 479143</a>
 <p id="display"></p>
 <div id="content" style="display: none"></div>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 3);
-} else if (navigator.platform.indexOf("Linux") == 0) {
-  SimpleTest.expectAssertions(0, 2);
-}
-
   SimpleTest.waitForExplicitFinish();
 
   setTimeout(function() {
     var interval = setInterval(function() { var i = 0; i++; }, 10);
 
     var xhr = new XMLHttpRequest();
     xhr.open("GET", "test_bug479143.html", false);
     xhr.send(null);
--- a/dom/tests/mochitest/bugs/test_bug484775.html
+++ b/dom/tests/mochitest/bugs/test_bug484775.html
@@ -13,22 +13,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=484775">Mozilla Bug 484775</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Linux") == 0) {
-  SimpleTest.expectAssertions(0, 3);
-} else if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 2);
-}
-
 /** Test for Bug 484775 **/
 
 var expectedTarget = null;
 var expectedType = null;
 var eventCount = 0;
 
 function listener(evt) {
   ++eventCount;
--- a/dom/tests/mochitest/bugs/test_bug492925.html
+++ b/dom/tests/mochitest/bugs/test_bug492925.html
@@ -19,20 +19,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=492925">Mozilla Bug 492925</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Win") != 0) {
-  SimpleTest.expectAssertions(0, 2);
-}
-
 /** Test for Bug 492925 **/
 
 var sheet = document.styleSheets[1];
 var rule = sheet.cssRules[0];
 var media = rule.media;
 
 is(media.mediaText, "tv, print", "Unexpected media string");
 is(media[0], "tv", "[0] should be 'tv'");
--- a/dom/tests/mochitest/bugs/test_bug49312.html
+++ b/dom/tests/mochitest/bugs/test_bug49312.html
@@ -32,22 +32,16 @@ https://bugzilla.mozilla.org/show_bug.cg
   <iframe src="javascript:'<script>location=\'iframe_bug49312.html\'</script>'"></iframe>
 </p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 1);
-} else if (navigator.platform.indexOf("Linux") == 0) {
-  SimpleTest.expectAssertions(0, 3);
-}
-
 /** Test for Bug 49312 **/
 SimpleTest.waitForExplicitFinish();
 var opened = window.open("javascript:'<script>location=\\\'iframe_bug49312.html\\\'</" + "script>'", "", "width=100,height=100")
 
 </script>
 </pre>
 </body>
 </html>
--- a/dom/tests/mochitest/bugs/test_bug495219.html
+++ b/dom/tests/mochitest/bugs/test_bug495219.html
@@ -10,22 +10,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 </head>
 <body>
 <a target="_blank"
    href="https://bugzilla.mozilla.org/show_bug.cgi?id=495219">Mozilla
    Bug 495219</a>
 <iframe onload="this.style.display='none'"></iframe>
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 1);
-} else if (navigator.platform.indexOf("Linux") == 0) {
-  SimpleTest.expectAssertions(0, 3);
-}
-
 SimpleTest.waitForExplicitFinish();
 window.onload = function () {
   is(window.frames[0].innerWidth, 0, "width should be zero");
   is(window.frames[0].innerHeight, 0, "height should be zero");
   SimpleTest.finish();
 }
 
 </script>
--- a/dom/tests/mochitest/bugs/test_bug504862.html
+++ b/dom/tests/mochitest/bugs/test_bug504862.html
@@ -8,17 +8,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body onload="runTest()">
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=504862">Mozilla Bug 504862</a>
 <script class="testbody" type="text/javascript">
 
 if (navigator.platform.indexOf("Win") != 0) {
-  SimpleTest.expectAssertions(0, 5);
+  SimpleTest.expectAssertions(1);
 }
 
 /** Test for Bug 504862 **/
 SimpleTest.waitForExplicitFinish();
 function onMsgRcv(event)
 {
   is(event.data, "args: undefined", "Unexpected cross origin dialog arguments.");
 }
--- a/dom/tests/mochitest/bugs/test_bug529328.html
+++ b/dom/tests/mochitest/bugs/test_bug529328.html
@@ -10,21 +10,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=529328">Mozilla Bug 529328</a>
 <p id="display"></p>
 <div id="content" style="display: none">
 </div>
 <pre id="test">
 <script type="application/javascript">
-
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 4);
-}
-
 /** Test for Bug 529328 **/
 function testDOMTokenList() {
   is(document.body.classList[-1], undefined, "Wrong value for out of bounds access (DOMTokenList)");
   is(document.body.classList[0], undefined, "Wrong value for out of bounds access (DOMTokenList)");
   is(document.body.classList[1], undefined, "Wrong value for out of bounds access (DOMTokenList)");
   is(document.body.classList[2], undefined, "Wrong value for out of bounds access (DOMTokenList)");
   is(document.body.classList.item(-1), null, "Wrong value for out of bounds access (DOMTokenList)");
   is(document.body.classList.item(0), null, "Wrong value for out of bounds access (DOMTokenList)");
--- a/dom/tests/mochitest/bugs/test_bug531176.html
+++ b/dom/tests/mochitest/bugs/test_bug531176.html
@@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=531176">Mozilla Bug 531176</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 4);
-}
-
 /** Test for Bug 531176 **/
 
 var errorCount = 0;
 function errorHandler(msg, filename, linenr) {
   is(msg, "SyntaxError: syntax error", "Wrong error!");
   is(filename, window.location, "Wrong filename!");
   is(linenr, 1, "Wrong linenr!");
   ++errorCount;
--- a/dom/tests/mochitest/bugs/test_bug531542.html
+++ b/dom/tests/mochitest/bugs/test_bug531542.html
@@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=531542">Mozilla Bug 531542</a>
 <p id="display"></p>
 <div id="content" style="display: none">
 
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 4);
-}
-
 /** Test for Bug 531542 **/
 
 var negativeTimeoutFired = false;
 function negativeTimeout()
 {
   negativeTimeoutFired = true;
 }
 function testFinished()
--- a/dom/tests/mochitest/bugs/test_bug534149.html
+++ b/dom/tests/mochitest/bugs/test_bug534149.html
@@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=534149">Mozilla Bug 534149</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 4);
-}
-
 /** Test for Bug 534149 **/
 function getIDs(iframe) {
   var win = iframe.contentWindow;
   // Force inner creation
   win.document;
 
   var util = SpecialPowers.getDOMWindowUtils(win);
   return [util.outerWindowID, util.currentInnerWindowID];
--- a/dom/tests/mochitest/bugs/test_bug541530.html
+++ b/dom/tests/mochitest/bugs/test_bug541530.html
@@ -11,22 +11,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=541530">Mozilla Bug 541530</a>
 <p id="display"></p>
 <div id="content" style="display: none"></div>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 3);
-} else if (navigator.platform.indexOf("Linux") == 0) {
-  SimpleTest.expectAssertions(0, 5);
-}
-
 var orig = window;
 window = {};
 
 var origLocation = location;
 
 ok(window === orig, "can't override window");
 ok(window.location === location, "properties are properly aliased");
 ok(document.location === location, "properties are properly aliased");
--- a/dom/tests/mochitest/bugs/test_bug545314.html
+++ b/dom/tests/mochitest/bugs/test_bug545314.html
@@ -13,20 +13,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <iframe id="ifr"></iframe>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 4);
-}
-
 /** Test for Bug 545314 **/
 var frame = window.frames[0];
 frame.location.assign("http://localhost:8888/");
 ok(true, "location.assign didn't throw");
 
 </script>
 </pre>
 </body>
--- a/dom/tests/mochitest/bugs/test_bug548828.html
+++ b/dom/tests/mochitest/bugs/test_bug548828.html
@@ -13,20 +13,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=548828">Mozilla Bug 548828</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 5);
-}
-
 /** Test for Bug 548828 **/
   var head = document.getElementsByTagName("head")[0];
   is(document.head, head, "document.head and document.getElementsByTagName(\"head\")[0] should match");
   document.head = "";
   is(document.head, head, "document.head reassigned");
   document.head = document.createElement("head");
   is(document.head, head, "new element created with the name \"head\"");
   document.documentElement.appendChild(document.createElement("head"));
--- a/dom/tests/mochitest/bugs/test_bug562433.html
+++ b/dom/tests/mochitest/bugs/test_bug562433.html
@@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=562433">Mozilla Bug 562433</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Linux") == 0) {
-  SimpleTest.expectAssertions(0, 4);
-}
-
 /** Test for Bug 562433 **/
 
 var w = window.open("");
 
 // The new window's location.host and location.hostname must be the empty
 // string (instead of throwing an exception)
 
 is(w.location.host, "", 'w.location.host should be ""');
--- a/dom/tests/mochitest/bugs/test_bug563487.html
+++ b/dom/tests/mochitest/bugs/test_bug563487.html
@@ -21,18 +21,14 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=563487">Mozilla Bug 563487</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 4);
-}
-
 /** Test for Bug 563487 **/
 is(exception, null, "removeEventListener threw");
 </script>
 </pre>
 </body>
 </html>
--- a/dom/tests/mochitest/bugs/test_bug583225.html
+++ b/dom/tests/mochitest/bugs/test_bug583225.html
@@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=583225">Mozilla Bug 583225</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Linux") == 0) {
-  SimpleTest.expectAssertions(0, 4);
-}
-
 /** Test for Bug 583225 **/
 
 function clicked()
 {
   ok(true, "Event fired on DocumentFragment.");
   SimpleTest.finish();
 }
 
--- a/dom/tests/mochitest/bugs/test_bug585240.html
+++ b/dom/tests/mochitest/bugs/test_bug585240.html
@@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=585240">Mozilla Bug 585240</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 4);
-}
-
 /** Test for Bug 585240 **/
 
   SimpleTest.waitForExplicitFinish();
 
   window.onmessage = function(event) {
     ok(true, "message event should fire!");
     SimpleTest.finish();
   }
--- a/dom/tests/mochitest/bugs/test_bug585819.html
+++ b/dom/tests/mochitest/bugs/test_bug585819.html
@@ -13,20 +13,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=585819">Mozilla Bug 585819</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   <iframe></iframe>
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-if (navigator.platform.indexOf("Linux") == 0) {
-  SimpleTest.expectAssertions(0, 4);
-}
-
 /** Test for Bug 585819 **/
 
 var range = document.createRange();
 range.setStartBefore(document.body);
 var fragment = range.createContextualFragment("<span></span>");
 is(fragment.firstChild.localName, "span", "We don't want tag inference here!");
 
 var iframeDoc = document.getElementsByTagName("iframe")[0].contentDocument;
--- a/dom/tests/mochitest/bugs/test_bug593174.html
+++ b/dom/tests/mochitest/bugs/test_bug593174.html
@@ -8,20 +8,16 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=593174">Mozilla Bug 593174</a>
 
 <script>
 
-if (navigator.platform.indexOf("Win") != 0) {
-  SimpleTest.expectAssertions(0, 4);
-}
-
 SimpleTest.waitForExplicitFinish();
 
 var loadCount = 0;
 var popup = null;
 
 const kOriginalLocation = location.href;
 
 function iframeLoaded(identifier) {
--- a/dom/tests/mochitest/bugs/test_bug597809.html
+++ b/dom/tests/mochitest/bugs/test_bug597809.html
@@ -9,20 +9,16 @@ https://bugzilla.mozilla.org/show_bug.cg
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=597809">Mozilla Bug 597809</a>
 <p id="display"></p>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Win") != 0) {
-  SimpleTest.expectAssertions(0, 4);
-}
-
 /** Test for Bug 597809 **/
 
 SimpleTest.waitForExplicitFinish();
 
 SpecialPowers.addCategoryEntry("JavaScript-global-property", "testSNSM", "@mozilla.org/embedcomp/prompt-service;1",
                     false, true);
 
 SimpleTest.executeSoon(function () {
--- a/dom/tests/mochitest/bugs/test_bug61098.html
+++ b/dom/tests/mochitest/bugs/test_bug61098.html
@@ -16,17 +16,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 </p>
 <div id="content" style="display: none"> 
 </div>
 <pre id="test">
 </pre>
 <script class="testbody" type="text/javascript">
 /** Test for Bug 61098 **/
 
-SimpleTest.expectAssertions(8, 13);
+SimpleTest.expectAssertions(8);
 
 SimpleTest.waitForExplicitFinish();
 
 var mockPromptServiceRegisterer, mockPromptFactoryRegisterer;
 
 var promptState;
 
 function registerMockPromptService()
--- a/dom/tests/mochitest/bugs/test_bug612267.html
+++ b/dom/tests/mochitest/bugs/test_bug612267.html
@@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=612267">Mozilla Bug 612267</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 1);
-}
-
 Window.prototype.test = 'PASS';
 is(window.test, 'PASS', "setting Window.prototype affects window.__proto__");
 is(test, 'PASS', "setting Window.prototype affects the inner window lookup for sure");
 
 </script>
 </pre>
 </body>
 </html>
--- a/dom/tests/mochitest/bugs/test_bug620947.html
+++ b/dom/tests/mochitest/bugs/test_bug620947.html
@@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=620947">Mozilla Bug 620947</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 1);
-}
-
 /** Test for Bug 620947 **/
 is(-1 in document.all, false, "shouldn't be there");
 is(document.all[-1], undefined, "shouldn't be able to get it");
 
 
 
 
 
--- a/dom/tests/mochitest/bugs/test_bug622361.html
+++ b/dom/tests/mochitest/bugs/test_bug622361.html
@@ -1,22 +1,15 @@
 <!DOCTYPE html>
 <html>
 <head>
 <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 <script>
-
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 3);
-} else if (navigator.platform.indexOf("Linux") == 0) {
-  SimpleTest.expectAssertions(0, 1);
-}
-
 var w;
 var counter = 0;
 
 function doNext()
 {
   counter++;
   postMessage("ohai", "*");
 }
--- a/dom/tests/mochitest/bugs/test_bug633133.html
+++ b/dom/tests/mochitest/bugs/test_bug633133.html
@@ -17,20 +17,16 @@ https://bugzilla.mozilla.org/show_bug.cg
   <select id="select" onchange="var foo = 'bar';">
     <option>option1</option>
     <option>option2</option>
   </select>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Win") != 0) {
-  SimpleTest.expectAssertions(0, 1);
-}
-
 /** Test for Bug 633133 **/
 
 var divCollection = document.getElementsByTagName('div');
 
 ok("foo" in divCollection, "'foo' should be in the div collection");
 ok("bar" in divCollection, "'bar' should be in the div collection");
 ok(!("" in divCollection), "empty string shouldn't be in the div collection");
 ok(!("foobar" in divCollection), "'foobar' shouldn't be in the div collection");
--- a/dom/tests/mochitest/bugs/test_bug641552.html
+++ b/dom/tests/mochitest/bugs/test_bug641552.html
@@ -10,20 +10,16 @@ https://bugzilla.mozilla.org/show_bug.cg
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=641552">Mozilla Bug 641552</a>
 <p id="display"></p>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Mac") == 0) {
-  SimpleTest.expectAssertions(0, 1);
-}
-
 /** Test for Bug 641552 **/
 
 SimpleTest.waitForExplicitFinish();
 
 SpecialPowers.addCategoryEntry("JavaScript-global-property", "randomname", "@mozilla.org/embedcomp/prompt-service;1",
                     false, true);
 
 SpecialPowers.addCategoryEntry("JavaScript-navigator-property", "randomname1", "@mozilla.org/embedcomp/prompt-service;1",
--- a/dom/tests/mochitest/bugs/test_bug642026.html
+++ b/dom/tests/mochitest/bugs/test_bug642026.html
@@ -33,20 +33,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=642026">Mozilla Bug 642026</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Linux") == 0) {
-  SimpleTest.expectAssertions(0, 1);
-}
-
 /** Test for Bug 642026 **/
 
 var expResult = ["NaN", "Infinity", "undefined", "eval", "parseInt", "parseFloat", "isNaN", "isFinite", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "Object", "Function", "Array", "String", "Boolean", "Number", "Date", "Date", "RegExp", "Error", "EvalError", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "URIError", "Math", "JSON"];
 
 var result = Object.getOwnPropertyNames(window);
 var result1 = {};
 for (var p in result) {
     result1[result[p]] = true;
--- a/dom/tests/mochitest/bugs/test_bug648465.html
+++ b/dom/tests/mochitest/bugs/test_bug648465.html
@@ -14,20 +14,16 @@ https://bugzilla.mozilla.org/show_bug.cg
   Mozilla Bug 648465</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-if (navigator.platform.indexOf("Win") != 0) {
-  SimpleTest.expectAssertions(0, 1);
-}
-
 /** Test for Bug 648465 **/
 var w = window.open('about:blank');
 try {
   is(w.fullScreen, false, "can access non-allAccess properties of w");
 } finally {
   w.close();
 }
 
--- a/dom/tests/mochitest/bugs/test_bug664737.html
+++ b/dom/tests/mochitest/bugs/test_bug664737.html
@@ -13,20 +13,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=664737">Mozilla Bug 664737</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (navigator.platform.indexOf("Linux") == 0) {
-  SimpleTest.expectAssertions(0, 1);
-}
-
 /** Test for Bug 664737 **/
 function shouldfail(name) {
     try {
         var rv = history[name];
         fail(false, "able to access history." + name);
     } catch (e) {
         ok(e.message.indexOf("Permission denied") >= 0, "cannot access history." + name);
     }