Bug 404077: Adjust annotations of expected assertions.
authorL. David Baron <dbaron@dbaron.org>
Wed, 27 Feb 2013 10:37:19 -0800
changeset 134409 c7cedc21bdf2ef82cbb615cfadbffaa080ef6f9a
parent 134408 5433594e6d4c4e34f61549852d38af1caffacd4f
child 134410 e85c2b64d0ed581189e37f7d4324791fa3590c88
push id336
push userakeybl@mozilla.com
push dateMon, 17 Jun 2013 22:53:19 +0000
treeherdermozilla-release@574a39cdf657 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs404077
milestone22.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 404077: Adjust annotations of expected assertions.
accessible/tests/mochitest/actions/test_link.html
content/html/content/test/test_fullscreen-api.html
content/media/test/test_a4_tone.html
content/media/test/test_bug493187.html
content/media/test/test_framebuffer.html
content/media/test/test_invalid_reject.html
content/media/test/test_loop.html
content/media/test/test_paused_after_ended.html
content/media/test/test_play_events.html
content/media/test/test_play_events_2.html
content/media/test/test_play_twice.html
content/media/test/test_playback.html
content/media/test/test_playback_errors.html
content/media/test/test_playback_rate.html
content/media/test/test_preload_actions.html
content/media/test/test_seek.html
content/media/test/test_too_many_elements.html
docshell/test/navigation/test_child.html
docshell/test/navigation/test_grandchild.html
docshell/test/navigation/test_not-opener.html
docshell/test/navigation/test_opener.html
dom/media/tests/mochitest/test_peerConnection_basicAudioVideo.html
dom/media/tests/mochitest/test_peerConnection_basicAudioVideoCombined.html
dom/permission/tests/test_permission_basics.html
dom/plugins/test/mochitest/test_GCrace.html
dom/plugins/test/mochitest/test_pluginstream_seek_close.html
dom/plugins/test/mochitest/test_twostreams.html
dom/tests/mochitest/bugs/test_bug479143.html
dom/tests/mochitest/bugs/test_bug504862.html
dom/tests/mochitest/bugs/test_bug61098.html
dom/tests/mochitest/pointerlock/test_pointerlock-api.html
layout/base/tests/chrome/test_printpreview_bug482976.xul
layout/base/tests/chrome/test_transformed_scrolling_repaints.html
layout/forms/test/test_bug665540.html
layout/generic/test/test_bug632379.xul
layout/generic/test/test_selection_preventDefault.html
security/manager/ssl/tests/mochitest/mixedcontent/test_bug472986.html
toolkit/content/tests/chrome/test_bug471776.xul
toolkit/content/tests/chrome/test_bug557987.xul
toolkit/content/tests/chrome/test_bug562554.xul
toolkit/content/tests/chrome/test_bug792324.xul
toolkit/content/tests/chrome/test_chromemargin.xul
toolkit/content/tests/chrome/test_closemenu_attribute.xul
toolkit/content/tests/chrome/test_deck.xul
toolkit/content/tests/chrome/test_findbar_events.xul
toolkit/content/tests/chrome/test_focus_anons.xul
toolkit/content/tests/chrome/test_hiddenitems.xul
--- a/accessible/tests/mochitest/actions/test_link.html
+++ b/accessible/tests/mochitest/actions/test_link.html
@@ -13,17 +13,17 @@
           src="../common.js"></script>
   <script type="application/javascript"
           src="../events.js"></script>
   <script type="application/javascript"
           src="../actions.js"></script>
 
   <script type="application/javascript">
     if (navigator.platform.startsWith("Win")) {
-      SimpleTest.expectAssertions(13);
+      SimpleTest.expectAssertions(13, 14);
     } else if (navigator.platform.startsWith("Linux")) {
       SimpleTest.expectAssertions(18);
     } else if (navigator.platform.startsWith("Mac")) {
       SimpleTest.expectAssertions(0, 14);
     }
 
     function getAnchorTargetDocumentAcc()
     {
--- a/content/html/content/test/test_fullscreen-api.html
+++ b/content/html/content/test/test_fullscreen-api.html
@@ -16,17 +16,21 @@
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=545812">Mozilla Bug 545812</a>
 <p id="display"></p>
 <div id="content" style="display: none">
 
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-SimpleTest.expectAssertions(1); // bug 845552
+if (navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 1); // bug 845552
+} else {
+  SimpleTest.expectAssertions(1); // bug 845552
+}
 
 /** Tests for Bug 545812 **/
 
 // Ensure the full-screen api is enabled, and will be disabled on test exit.
 SpecialPowers.setBoolPref("full-screen-api.enabled", true);
 
 // Disable the requirement for trusted contexts only, so the tests are easier
 // to write.
--- a/content/media/test/test_a4_tone.html
+++ b/content/media/test/test_a4_tone.html
@@ -16,16 +16,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=490705">Mozilla Bug 490705</a>
 
 <!-- mute audio, since there is no need to hear the sound for these tests -->
 <audio id='a1' controls></audio>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+if (navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 2); // bug 845676
+}
+
 /**
 * FFT is a class for calculating the Discrete Fourier Transform of a signal
 * with the Fast Fourier Transform algorithm.
 *
 * Source: github.com/corbanbrook/dsp.js; License: MIT; Copyright: Corban Brook
 *
 * @param {Number} bufferSize The size of the sample buffer to be computed. Must be power of 2
 * @param {Number} sampleRate The sampleRate of the buffer (eg. 44100)
--- a/content/media/test/test_bug493187.html
+++ b/content/media/test/test_bug493187.html
@@ -11,16 +11,18 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script type="text/javascript" src="use_large_cache.js"></script>
   <script type="text/javascript" src="manifest.js"></script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=493187">Mozilla Bug 493187</a>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+SimpleTest.expectAssertions(0, 1);
+
 var manager = new MediaTestManager;
 
 function start(e) {
   e.target.currentTime = e.target.duration / 4;
 }
 
 function startSeeking(e) {
   e.target._seeked = true;
--- a/content/media/test/test_framebuffer.html
+++ b/content/media/test/test_framebuffer.html
@@ -12,16 +12,21 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=490705">Mozilla Bug 490705</a>
 
 <!-- mute audio, since there is no need to hear the sound for these tests -->
 <audio id='a1' controls></audio>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
+
+if (navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 2); // bug 845676
+}
+
 var testFile = "bug495794.ogg";
 var testFileDuration = 0.30;
 var testFileChannelCount = 6;
 var testFileSampleRate = 48000;
 var testFileFrameBufferLength = 6 * 1024;
 
 var undef;
 
--- a/content/media/test/test_invalid_reject.html
+++ b/content/media/test/test_invalid_reject.html
@@ -6,16 +6,20 @@
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <script type="text/javascript" src="manifest.js"></script>
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+if (navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 20); // bug 845676
+}
+
 var manager = new MediaTestManager;
 
 function startTest(test, token) {
   var v = document.createElement('video');
   manager.started(token);
 
   // Set up event handlers. Seeing any of these is a failure.
   function badEvent(type) { return function(e) {
--- a/content/media/test/test_loop.html
+++ b/content/media/test/test_loop.html
@@ -4,16 +4,21 @@
   <title>Test looping support</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <script type="text/javascript" src="manifest.js"></script>
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
+
+if (navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 16); // bug 845676
+}
+
 var manager = new MediaTestManager;
 
 function startTest(test, token) {
   manager.started(token);
   var v = document.createElement('video');
   v.token = token;
   v.src = test.name;
   v.name = test.name;
--- a/content/media/test/test_paused_after_ended.html
+++ b/content/media/test/test_paused_after_ended.html
@@ -5,16 +5,20 @@
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <script type="text/javascript" src="manifest.js"></script>
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+if (navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 20); // bug 845676
+}
+
 var manager = new MediaTestManager;
 
 function ended(evt) {
   var v = evt.target;
   is(v.gotPause, true, "We should have received a \"pause\" event.")
   is(v.paused, true, v._name + " must be paused after end");
   manager.finished(v.token);
 }
--- a/content/media/test/test_play_events.html
+++ b/content/media/test/test_play_events.html
@@ -6,16 +6,20 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <script type="text/javascript" src="manifest.js"></script>
 </head>
 <body>
 <pre id="test">
 
 <script>
 
+if (navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 16); // bug 845676
+}
+
 var manager = new MediaTestManager;
 
 var tokens = {
   0:                ["play"],
   "play":           ["canplay"],
   "canplay":        ["playing"],
   "playing":        ["canplay", "canplaythrough"],
   "canplaythrough": ["canplay", "canplaythrough"]
--- a/content/media/test/test_play_events_2.html
+++ b/content/media/test/test_play_events_2.html
@@ -5,16 +5,21 @@
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <script type="text/javascript" src="manifest.js"></script>
 </head>
 <body>
 <pre id="test">
 
 <script>
+
+if (navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 16); // bug 845676
+}
+
 var manager = new MediaTestManager;
 
 var tokens = {
   0:                ["play"],
   "play":           ["canplay"],
   "canplay":        ["playing"],
   "playing":        ["canplay", "canplaythrough"],
   "canplaythrough": ["canplay", "canplaythrough"]
--- a/content/media/test/test_play_twice.html
+++ b/content/media/test/test_play_twice.html
@@ -5,16 +5,20 @@
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <script type="text/javascript" src="manifest.js"></script>
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+if (navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 18); // bug 845676
+}
+
 var manager = new MediaTestManager;
 
 function startTest(test, token) {
   var v = document.createElement('video');
   v.token = token;
   manager.started(token);
   v.src = test.name;
   v.name = test.name;
--- a/content/media/test/test_playback.html
+++ b/content/media/test/test_playback.html
@@ -5,16 +5,20 @@
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <script type="text/javascript" src="manifest.js"></script>
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+if (navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 84); // bug 845676
+}
+
 var manager = new MediaTestManager;
 
 function startTest(test, token) {
   var v = document.createElement('video');
   v.token = token;
   manager.started(token);
 
   v.src = test.name;
--- a/content/media/test/test_playback_errors.html
+++ b/content/media/test/test_playback_errors.html
@@ -5,16 +5,20 @@
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <script type="text/javascript" src="manifest.js"></script>
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+if (navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 16); // bug 845676
+}
+
 var manager = new MediaTestManager;
 
 function startTest(test, token) {
   var v = document.createElement('video');
   manager.started(token);
   v._errorCount = 0;
   v._ignore = false;
   function endedTest(v) {
--- a/content/media/test/test_playback_rate.html
+++ b/content/media/test/test_playback_rate.html
@@ -7,16 +7,18 @@
   <script type="text/javascript" src="manifest.js"></script>
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type='application/javascript;version=1.8'>
 
 if (navigator.platform.startsWith("Win")) {
   SimpleTest.expectAssertions(0, 1);
+} else if (navigator.platform.startsWith("Mac")) {
+  SimpleTest.expectAssertions(0, 2);
 }
 
 let manager = new MediaTestManager;
 
 function rangeCheck(lhs, rhs, threshold) {
   var diff = Math.abs(lhs - rhs);
   if (diff < threshold) {
     return true;
--- a/content/media/test/test_preload_actions.html
+++ b/content/media/test/test_preload_actions.html
@@ -16,16 +16,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="content" style="display: none">
   
 </div>
 <!-- <button onClick="SimpleTest.finish();">Finish</button> -->
 <div>Tests complete: <span id="log" style="font-size: small;"></span></div>
 <pre id="test">
 <script type="application/javascript">
 
+if (navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 8); // bug 845676
+}
+
 /** Test for Bug 548523 **/
 
 var manager = new MediaTestManager;
 
 manager.onFinished = function() {
   is(gotLoadEvent, true, "Should not have delayed the load event indefinitely");
 };
 
--- a/content/media/test/test_seek.html
+++ b/content/media/test/test_seek.html
@@ -18,17 +18,17 @@
   <script type="text/javascript" src="seek11.js"></script>
   <script type="text/javascript" src="seek12.js"></script>
   <script type="text/javascript" src="seek13.js"></script>
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-SimpleTest.expectAssertions(120, 400);
+SimpleTest.expectAssertions(80, 400);
 
 var manager = new MediaTestManager;
 
 const NUM_SEEK_TESTS = 13;
 
 function createTestArray() {
   var tests = [];
   var tmpVid = document.createElement("video");
--- a/content/media/test/test_too_many_elements.html
+++ b/content/media/test/test_too_many_elements.html
@@ -15,16 +15,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <p id="display"></p>
 <div id="content" style="display: none">
 </div>
 
 <p>Received loadeddata event for <span id="result">0</span> <span id="expected"></span>audio elements.</p>
 <pre id="test">
 <script type="application/javascript">
 
+if (navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 2); // bug 845676
+}
+
 /** Test for Bug 713381 **/
 
 const num = 500;
 var loadeddata = 0;
 
 var result = document.getElementById("result");
 document.getElementById("expected").innerHTML = " of " + num + " ";
 
--- a/docshell/test/navigation/test_child.html
+++ b/docshell/test/navigation/test_child.html
@@ -4,17 +4,17 @@
     <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
     <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
     <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     <script type="text/javascript" src="NavigationUtils.js"></script>        
     <style type="text/css">
       iframe { width: 90%; height: 50px; }
     </style>
 <script>
-if (navigator.platform.startsWith("Mac")) {
+if (!navigator.platform.startsWith("Win")) {
   SimpleTest.expectAssertions(0, 1);
 }
 
 window.onload = function() {
   navigateByLocation(frames[0]);
   navigateByOpen("child1");
   navigateByForm("child2");
   navigateByHyperlink("child3");
--- a/docshell/test/navigation/test_grandchild.html
+++ b/docshell/test/navigation/test_grandchild.html
@@ -4,17 +4,17 @@
     <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
     <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
     <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     <script type="text/javascript" src="NavigationUtils.js"></script>        
     <style type="text/css">
       iframe { width: 90%; height: 200px; }
     </style>
 <script>
-if (navigator.platform.startsWith("Mac")) {
+if (!navigator.platform.startsWith("Win")) {
   SimpleTest.expectAssertions(0, 1);
 }
 
 window.onload = function () {
   navigateByLocation(frames[0].frames[0]);
   navigateByOpen("child1_child0");
   navigateByForm("child2_child0");
   navigateByHyperlink("child3_child0");
--- a/docshell/test/navigation/test_not-opener.html
+++ b/docshell/test/navigation/test_not-opener.html
@@ -4,16 +4,20 @@
     <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
     <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
     <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     <script type="text/javascript" src="NavigationUtils.js"></script>        
     <style type="text/css">
       iframe { width: 90%; height: 50px; }
     </style>
 <script>
+if (navigator.platform.startsWith("Linux")) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 window.onload = function () {
   //navigateByLocation(window0);  // Don't have a handle to the window.
   navigateByOpen("window1");
   navigateByForm("window2");
   navigateByHyperlink("window3");
 
   xpcWaitForFinishedFrames(function() {
     is(xpcGetFramesByName("window1").length, 2, "Should not be able to navigate popup's popup by calling window.open.");
--- a/docshell/test/navigation/test_opener.html
+++ b/docshell/test/navigation/test_opener.html
@@ -4,16 +4,20 @@
     <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
     <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
     <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     <script type="text/javascript" src="NavigationUtils.js"></script>        
     <style type="text/css">
       iframe { width: 90%; height: 50px; }
     </style>
 <script>
+if (navigator.platform.startsWith("Linux")) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 window.onload = function () {
   navigateByLocation(window0);
   navigateByOpen("window1");
   navigateByForm("window2");
   navigateByHyperlink("window3");
 
   xpcWaitForFinishedFrames(function() {
     isNavigated(window0, "Should be able to navigate popup by setting location.");
--- a/dom/media/tests/mochitest/test_peerConnection_basicAudioVideo.html
+++ b/dom/media/tests/mochitest/test_peerConnection_basicAudioVideo.html
@@ -21,16 +21,18 @@ https://bugzilla.mozilla.org/show_bug.cg
   <video id="videoPCRemote" width="160" height="120" controls></video>
   <video id="videoLocal" width="160" height="120" controls></video>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 if (navigator.platform.startsWith("Win")) {
   SimpleTest.expectAssertions(0, 9);
+} else if (navigator.platform.startsWith("Mac")) {
+  SimpleTest.expectAssertions(0, 2);
 } else {
   SimpleTest.expectAssertions(0, 1);
 }
 
   var audioLocal;
   var audioPCLocal;
   var audioPCRemote;
 
--- a/dom/media/tests/mochitest/test_peerConnection_basicAudioVideoCombined.html
+++ b/dom/media/tests/mochitest/test_peerConnection_basicAudioVideoCombined.html
@@ -19,19 +19,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
   <video id="videoPCLocal" width="160" height="120" controls></video>
   <video id="videoPCRemote" width="160" height="120" controls></video>
   <video id="videoLocal" width="160" height="120" controls></video>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-if (!navigator.platform.startsWith("Linux")) {
   SimpleTest.expectAssertions(0, 1);
-}
 
   var audioLocal;
   var videoLocal;
   var videoPCLocal;
   var videoPCRemote;
 
   var pcLocal;
   var pcRemote;
--- a/dom/permission/tests/test_permission_basics.html
+++ b/dom/permission/tests/test_permission_basics.html
@@ -16,16 +16,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="content" style="display: none">
 
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 "use strict";
 
+if (!navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 var testPrivApp = {
   'manifestURL' : 'https://aprivileged.com/manifest.webapp'
 };
 
 var testCertApp = {
   'manifestURL' : 'https://acertified.com/manifest.webapp'
 };
 
--- a/dom/plugins/test/mochitest/test_GCrace.html
+++ b/dom/plugins/test/mochitest/test_GCrace.html
@@ -16,17 +16,17 @@
     function start() {
       if (!SimpleTest.testPluginIsOOP()) {
         ok(true, "Skipping this test when test plugin is not OOP.");
         SimpleTest.finish();
         return;
       }
       else {
         if (navigator.platform.startsWith("Win")) {
-          SimpleTest.expectAssertions(0, 66);
+          SimpleTest.expectAssertions(0, 250);
         } else {
           SimpleTest.expectAssertions(0, 1);
         }
 
         setTimeout(checkGCRace, 1000);
       }
     }
 
--- a/dom/plugins/test/mochitest/test_pluginstream_seek_close.html
+++ b/dom/plugins/test/mochitest/test_pluginstream_seek_close.html
@@ -1,19 +1,17 @@
 <body>
 <head>
   <title>NPAPI Seekable NPStream Test</title>
   <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.startsWith("Linux")) {
-    SimpleTest.expectAssertions(0, 1);
-  }
+  SimpleTest.expectAssertions(0, 1);
 
   SimpleTest.waitForExplicitFinish();
 
   function frameLoaded() {
     var testframe = document.getElementById('testframe');
     var content = testframe.contentDocument.body.innerHTML;
     if (!content.length)
       return;
--- a/dom/plugins/test/mochitest/test_twostreams.html
+++ b/dom/plugins/test/mochitest/test_twostreams.html
@@ -5,21 +5,17 @@
           src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" 
         href="/tests/SimpleTest/test.css" />
 </head>
 <body>
   <p id="display"></p>
 
   <script type="text/javascript">
-  if (navigator.platform.startsWith("Win")) {
-    SimpleTest.expectAssertions(1, 2);
-  } else {
-    SimpleTest.expectAssertions(1);
-  }
+  SimpleTest.expectAssertions(1, 2);
 
   SimpleTest.waitForExplicitFinish();
 
   var framesToLoad = 2;
   function frameLoaded(id) {
     var frame = document.getElementById('testframe' + id);
     if (!frame.contentDocument.body.innerHTML.length)
       return;
--- a/dom/tests/mochitest/bugs/test_bug479143.html
+++ b/dom/tests/mochitest/bugs/test_bug479143.html
@@ -11,31 +11,42 @@ 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.startsWith("Win")) {
+    SimpleTest.expectAssertions(1);
+  }
+
   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);
 
     window.showModalDialog("javascript:" +
                            "setTimeout(function() { window.close(); }, 1000);",
                            null);
 
     clearInterval(interval);
 
     ok(true, "did not crash");
+
+    // Garbage collecting the windows created in this test can cause
+    // assertions, so GC now to blame those assertions to this test.
+    // ("mArguments wasn't cleaned up properly!" in ~nsGlobalWindow,
+    // bug 600703)
+    SpecialPowers.gc();
+
     SimpleTest.finish();
   }, 0);
 
 </script>
 </pre>
 </body>
 </html>
--- 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.startsWith("Win")) {
-  SimpleTest.expectAssertions(1);
+  SimpleTest.expectAssertions(4);
 }
 
 /** 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_bug61098.html
+++ b/dom/tests/mochitest/bugs/test_bug61098.html
@@ -16,17 +16,21 @@ 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);
+if (!navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(9);
+} else {
+  SimpleTest.expectAssertions(8);
+}
 
 SimpleTest.waitForExplicitFinish();
 
 var mockPromptServiceRegisterer, mockPromptFactoryRegisterer;
 
 var promptState;
 
 function registerMockPromptService()
@@ -342,14 +346,20 @@ function runtests()
 
   w.close();
 
   resetDialogLoopBlocking();
 
   mockPromptFactoryRegisterer.unregister();
   mockPromptServiceRegisterer.unregister();
 
+  // Garbage collecting the windows created in this test can cause
+  // assertions, so GC now to blame those assertions to this test.
+  // ("mArguments wasn't cleaned up properly!" in ~nsGlobalWindow,
+  // bug 600703)
+  SpecialPowers.gc();
+
   SimpleTest.finish();
 }
 
 </script>
 </body>
 </html>
--- a/dom/tests/mochitest/pointerlock/test_pointerlock-api.html
+++ b/dom/tests/mochitest/pointerlock/test_pointerlock-api.html
@@ -12,16 +12,21 @@ https://bugzilla.mozilla.org/show_bug.cg
   <body>
     <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=633602">
       Mozilla Bug 633602
     </a>
     <div id="content">
     </div>
     <pre id="test">
       <script type="application/javascript">
+
+        if (!navigator.platform.startsWith("Linux")) {
+          SimpleTest.expectAssertions(0, 1); // bug 845552
+        }
+
         /**
          * Pointer Lock tests for bug 633602.  These depend on the fullscreen api
          * which doesn't work when run in the mochitests' iframe, since the
          * mochitests' iframe doesn't have an allowfullscreen attribute.  To get
          * around this, all tests are run in a child window, which can go fullscreen.
          * This method is borrowed from content/html/content/test/test_fullscreen-api.html.
          **/
 
--- a/layout/base/tests/chrome/test_printpreview_bug482976.xul
+++ b/layout/base/tests/chrome/test_printpreview_bug482976.xul
@@ -11,12 +11,13 @@ https://bugzilla.mozilla.org/show_bug.cg
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
 <body xmlns="http://www.w3.org/1999/xhtml">
 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=482976"
    target="_blank">Mozilla Bug 482976</a>
 </body>
   <!-- test code goes here -->
 <script type="application/javascript">
 <![CDATA[
+SimpleTest.expectAssertions(0, 1);
 SimpleTest.waitForExplicitFinish();
 window.open("printpreview_bug482976_helper.xul", "bug482976", "chrome,width=100,height=100");
 ]]></script>
 </window>
--- a/layout/base/tests/chrome/test_transformed_scrolling_repaints.html
+++ b/layout/base/tests/chrome/test_transformed_scrolling_repaints.html
@@ -12,16 +12,18 @@
   <div style="height:40px;">Hello</div>
   <div id="e" style="height:30px; background:lime">Kitty</div>
   <div style="height:300px; background:yellow">Kitty</div>
 </div>
 <pre id="test">
 <script type="application/javascript">
 if (navigator.platform.startsWith("Linux")) {
   SimpleTest.expectAssertions(0, 2);
+} else if (navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 1);
 }
 SimpleTest.waitForExplicitFinish();
 
 var t = document.getElementById("t");
 var e = document.getElementById("e");
 var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
                getInterface(Components.interfaces.nsIDOMWindowUtils);
 const isLinux = navigator.platform.indexOf("Linux") >= 0;
--- a/layout/forms/test/test_bug665540.html
+++ b/layout/forms/test/test_bug665540.html
@@ -14,16 +14,18 @@ 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.startsWith("Linux")) {
+  SimpleTest.expectAssertions(0, 3);
+} else if (navigator.platform.startsWith("Win")) {
   SimpleTest.expectAssertions(0, 1);
 }
 
 /** Test for Bug 665540 **/
 
 SimpleTest.waitForExplicitFinish();
 
 var win;
--- a/layout/generic/test/test_bug632379.xul
+++ b/layout/generic/test/test_bug632379.xul
@@ -161,17 +161,19 @@ https://bugzilla.mozilla.org/show_bug.cg
   <p id="display"></p>
 <div id="content" style="display: none">
 </div>
 </body>
 
 
 <script class="testbody" type="application/javascript"><![CDATA[
 
-if (navigator.platform.startsWith("Linux")) {
+if (navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 3);
+} else if (navigator.platform.startsWith("Linux")) {
   SimpleTest.expectAssertions(0, 2);
 }
 
 /** Test for Bug 632379 **/
 // Tests whether scrolling a menu affects the position at which popups appear
 var pos = new Array(2);
 var count=0;
 
--- a/layout/generic/test/test_selection_preventDefault.html
+++ b/layout/generic/test/test_selection_preventDefault.html
@@ -27,16 +27,20 @@
 <body>
 <input id="input" type="text" value="iiiiiiiii iiiiiiiii iiiiiiiii">
 <div id="fixedDiv1" class="testingDiv">
 dddddd dddddd dddddd
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+if (navigator.platform.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 var fixedDiv1 = document.getElementById("fixedDiv1");
 var input = document.getElementById("input");
 
 function test()
 {
   function getSelectionForEditor(aEditorElement)
   {
     const nsIDOMNSEditableElement =
--- a/security/manager/ssl/tests/mochitest/mixedcontent/test_bug472986.html
+++ b/security/manager/ssl/tests/mochitest/mixedcontent/test_bug472986.html
@@ -7,17 +7,21 @@
   <script type="text/javascript" src="/MochiKit/Style.js"></script>
   <script type="text/javascript" src="/MochiKit/Signal.js"></script>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <script type="text/javascript" src="mixedContentTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 
   <script class="testbody" type="text/javascript">
 
-  SimpleTest.expectAssertions(3);
+  if (navigator.platform.startsWith("Win")) {
+    SimpleTest.expectAssertions(0, 3);
+  } else {
+    SimpleTest.expectAssertions(3);
+  }
 
   // Clear the default onload assigned to test start because we must
   // wait for replaced image to load and only after that test the security state
   var onLoadFunction = window.onload;
   window.onload = function()
   {
     var img1 = document.getElementById("img1");
     img1.addEventListener("load", onLoadFunction, false);
--- a/toolkit/content/tests/chrome/test_bug471776.xul
+++ b/toolkit/content/tests/chrome/test_bug471776.xul
@@ -25,16 +25,21 @@
     <div id="content" style="display: none">
     </div>
     <pre id="test">
     </pre>
   </body>
 
   <!-- test code goes here -->
   <script type="application/javascript"><![CDATA[
+
+    if (navigator.platform.startsWith("Mac")) {
+      SimpleTest.expectAssertions(0, 5);
+    }
+
     SimpleTest.waitForExplicitFinish();
 
     function doTest() {
       var t1 = $("t1");
       t1.focus();
       var t1Enabled = {};
       var t1CanUndo = {};
       t1.editor.canUndo(t1Enabled, t1CanUndo);
--- a/toolkit/content/tests/chrome/test_bug557987.xul
+++ b/toolkit/content/tests/chrome/test_bug557987.xul
@@ -18,17 +18,17 @@
                                           onfocus="eventReceived('focus')" />
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
 
 <script type="application/javascript">
 <![CDATA[
 
 if (navigator.platform.startsWith("Mac")) {
-  SimpleTest.expectAssertions(0, 1);
+  SimpleTest.expectAssertions(0, 5);
 }
 
 SimpleTest.waitForExplicitFinish();
 
 SimpleTest.waitForFocus(test);
 
 // Tests that mouse events are correctly dispatched to <toolbarbutton type="menu-button"/>
 function test() {
--- a/toolkit/content/tests/chrome/test_bug562554.xul
+++ b/toolkit/content/tests/chrome/test_bug562554.xul
@@ -23,16 +23,18 @@
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
 
 <script type="application/javascript">
 <![CDATA[
 
 if (navigator.platform.startsWith("Win")) {
   SimpleTest.expectAssertions(0, 1);
+} else if (navigator.platform.startsWith("Mac")) {
+  SimpleTest.expectAssertions(0, 5);
 }
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(test);
 
 // Tests that mouse events are correctly dispatched to <toolbarbutton type="menu"/>
 function test() {
   disableNonTestMouseEvents(true);
--- a/toolkit/content/tests/chrome/test_bug792324.xul
+++ b/toolkit/content/tests/chrome/test_bug792324.xul
@@ -34,17 +34,17 @@ https://bugzilla.mozilla.org/show_bug.cg
           oncommand="clicked(event)"
           label="Button in panel 2"
   />
 </panel>
 
 <script class="testbody" type="application/javascript;version=1.7"><![CDATA[
 
 if (navigator.platform.startsWith("Mac")) {
-  SimpleTest.expectAssertions(0, 3);
+  SimpleTest.expectAssertions(0, 6);
 }
 
 /** Test for Bug 792324 **/
 let after_click;
 
 function clicked(event) {
   after_click(event);
 }
--- a/toolkit/content/tests/chrome/test_chromemargin.xul
+++ b/toolkit/content/tests/chrome/test_chromemargin.xul
@@ -13,17 +13,17 @@
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
 
 <script>
 
 // Tests parsing of the chrome margin attrib on a window.
 
 if (navigator.platform.startsWith("Win")) {
-  SimpleTest.expectAssertions(0, 1);
+  SimpleTest.expectAssertions(0, 2);
 }
 
 SimpleTest.waitForExplicitFinish();
 function runTest()
 {
   window.open("window_chromemargin.xul", "_blank", "chrome,width=600,height=600");
 }
 </script>
--- a/toolkit/content/tests/chrome/test_closemenu_attribute.xul
+++ b/toolkit/content/tests/chrome/test_closemenu_attribute.xul
@@ -23,21 +23,17 @@
       </menupopup>
     </menu>
   </menupopup>
 </button>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
-if (navigator.platform.startsWith("Mac")) {
-  SimpleTest.expectAssertions(0, 3);
-} else if (navigator.platform.startsWith("Linux")) {
-  SimpleTest.expectAssertions(0, 5);
-}
+SimpleTest.expectAssertions(0, 7);
 
 SimpleTest.waitForExplicitFinish();
 
 var gExpectedId = "p3";
 var gMode = -1;
 var gModes = ["", "auto", "single", "none"];
 
 function nextTest()
--- a/toolkit/content/tests/chrome/test_deck.xul
+++ b/toolkit/content/tests/chrome/test_deck.xul
@@ -22,17 +22,17 @@
 </deck>
 
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
 
   <!-- test code goes here -->
   <script type="application/javascript"><![CDATA[
 
-if (navigator.platform.startsWith("Win")) {
+if (!navigator.platform.startsWith("Linux")) {
   SimpleTest.expectAssertions(0, 4);
 }
 
 SimpleTest.waitForExplicitFinish();
 
 function test_deck()
 {
   var deck = $("deck1");
--- a/toolkit/content/tests/chrome/test_findbar_events.xul
+++ b/toolkit/content/tests/chrome/test_findbar_events.xul
@@ -27,16 +27,18 @@ https://bugzilla.mozilla.org/show_bug.cg
     </pre>
   </body>
 
   <script class="testbody" type="application/javascript">
     <![CDATA[
 
       if (navigator.platform.startsWith("Mac")) {
         SimpleTest.expectAssertions(0, 4);
+      } else {
+        SimpleTest.expectAssertions(0, 2);
       }
 
       /** Test for Bug 793275 **/
       SimpleTest.waitForExplicitFinish();
       window.open("findbar_events_window.xul", "793275test",
                   "chrome,width=600,height=600");
 
     ]]>
--- a/toolkit/content/tests/chrome/test_focus_anons.xul
+++ b/toolkit/content/tests/chrome/test_focus_anons.xul
@@ -19,21 +19,17 @@
   </menupopup>
 </menulist>
 <textbox id="textbox"/>
 <scale id="scale"/>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
-if (navigator.platform.startsWith("Win")) {
-  SimpleTest.expectAssertions(0, 4);
-} else if (navigator.platform.startsWith("Mac")) {
-  SimpleTest.expectAssertions(0, 2);
-}
+SimpleTest.expectAssertions(0, 5);
 
 SimpleTest.waitForExplicitFinish();
 
 var gBlurs = 0, gFocuses = 0;
 var gExpectedBlur = "";
 var gExpectedFocus = "";
 
 function blurOccurred(event) {
--- a/toolkit/content/tests/chrome/test_hiddenitems.xul
+++ b/toolkit/content/tests/chrome/test_hiddenitems.xul
@@ -33,19 +33,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     <listitem id="listbox_item5" label="Item 5" collapsed="true"/>
     <listitem id="listbox_item6" label="Item 6"/>
     <listitem id="listbox_item7" label="Item 7" hidden="true"/>
   </listbox>
   
   <!-- test code goes here -->
   <script type="application/javascript"><![CDATA[
 
-if (navigator.platform.startsWith("Win")) {
-  SimpleTest.expectAssertions(0, 2);
-}
+SimpleTest.expectAssertions(0, 5);
 
 /** Test for Bug 317422 **/
 SimpleTest.waitForExplicitFinish();
 
 function testListbox(id)
 {
   var listbox = document.getElementById(id);
   listbox.focus();