Bug 404077: Annotate known assertions in mochitests.
authorL. David Baron <dbaron@dbaron.org>
Mon, 25 Feb 2013 18:39:21 -0800
changeset 124589 4dc2f8fdfb55ccb753f643ab74c0b1ad958627e7
parent 124588 30f7cbdcc2a18231cfa397209a5a05d97c9cd24f
child 124590 e8e4b3d4bcfa3902b6546e0669cef9612079805f
push idunknown
push userunknown
push dateunknown
bugs404077
milestone22.0a1
Bug 404077: Annotate known assertions in mochitests.
accessible/tests/mochitest/actions/test_general.xul
accessible/tests/mochitest/actions/test_link.html
accessible/tests/mochitest/attributes/test_obj.html
accessible/tests/mochitest/editabletext/test_1.html
accessible/tests/mochitest/events/test_focus_autocomplete.xul
accessible/tests/mochitest/events/test_focus_browserui.xul
accessible/tests/mochitest/events/test_focus_doc.html
accessible/tests/mochitest/relations/test_ui_modalprompt.html
accessible/tests/mochitest/text/test_singleline.html
accessible/tests/mochitest/text/test_whitespaces.html
accessible/tests/mochitest/text/test_words.html
accessible/tests/mochitest/tree/test_dockids.html
accessible/tests/mochitest/tree/test_txtctrl.xul
caps/tests/mochitest/test_principal_extendedorigin_appid_appstatus.html
content/base/test/test_bug527896.html
content/base/test/test_bug548193.html
content/base/test/test_bug638112.html
content/base/test/test_mutationobservers.html
content/events/test/test_bug457672.html
content/html/content/test/forms/test_meter_element.html
content/html/content/test/forms/test_progress_element.html
content/html/content/test/test_bug242709.html
content/html/content/test/test_bug277890.html
content/html/content/test/test_bug523771.html
content/html/content/test/test_iframe_sandbox_general.html
content/html/content/test/test_iframe_sandbox_navigation.html
content/html/document/test/test_bug391777.html
content/html/document/test/test_bug402680.html
content/html/document/test/test_bug403868.html
content/html/document/test/test_bug446483.html
content/html/document/test/test_bug448564.html
content/html/document/test/test_bug478251.html
content/html/document/test/test_bug741266.html
content/html/document/test/test_document-element-inserted.html
content/media/test/test_bug495300.html
content/media/test/test_bug686942.html
content/media/test/test_playback_rate.html
content/media/test/test_seek.html
content/media/test/test_seek_out_of_range.html
content/xbl/test/test_bug378518.xul
content/xul/templates/tests/chrome/test_tmpl_listboxelement.xul
content/xul/templates/tests/chrome/test_tmpl_storage_dynamicparameters.xul
docshell/test/chrome/test_bug303267.xul
docshell/test/chrome/test_bug456980.xul
docshell/test/chrome/test_bug608669.xul
docshell/test/chrome/test_mozFrameType.xul
docshell/test/navigation/test_child.html
docshell/test/navigation/test_grandchild.html
docshell/test/navigation/test_reserved.html
docshell/test/test_bug580069.html
docshell/test/test_bug668513.html
dom/bindings/test/test_bug773326.html
dom/browser-element/mochitest/test_browserElement_inproc_PurgeHistory.html
dom/encoding/test/test_TextDecoder.html
dom/encoding/test/test_TextEncoder.html
dom/media/tests/mochitest/test_getUserMedia_basicAudio.html
dom/media/tests/mochitest/test_getUserMedia_basicVideo.html
dom/media/tests/mochitest/test_getUserMedia_basicVideoAudio.html
dom/media/tests/mochitest/test_getUserMedia_exceptions.html
dom/media/tests/mochitest/test_getUserMedia_stopVideoAudioStream.html
dom/media/tests/mochitest/test_peerConnection_basicAudioVideo.html
dom/media/tests/mochitest/test_peerConnection_basicAudioVideoCombined.html
dom/network/tests/test_network_basics.html
dom/network/tests/test_tcpsocket_enabled_with_perm.html
dom/plugins/test/mochitest/test_GCrace.html
dom/plugins/test/mochitest/test_cocoa_focus.html
dom/plugins/test/mochitest/test_cookies.html
dom/plugins/test/mochitest/test_pluginstream_seek_close.html
dom/plugins/test/mochitest/test_twostreams.html
dom/tests/mochitest/bugs/test_bug291653.html
dom/tests/mochitest/bugs/test_bug304459.html
dom/tests/mochitest/bugs/test_bug308856.html
dom/tests/mochitest/bugs/test_bug327891.html
dom/tests/mochitest/bugs/test_bug333983.html
dom/tests/mochitest/bugs/test_bug342448.html
dom/tests/mochitest/bugs/test_bug346659.html
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
dom/tests/mochitest/chrome/test_focus.xul
dom/workers/test/test_fileReadSlice.xul
editor/libeditor/base/tests/test_bug646194.xul
editor/libeditor/html/tests/test_bug537046.html
editor/libeditor/html/tests/test_bug599322.html
editor/libeditor/html/tests/test_bug674770-1.html
editor/libeditor/text/tests/test_bug638596.html
extensions/universalchardet/tests/test_bug426271-utf-8.html
js/xpconnect/tests/chrome/test_bug503926.xul
js/xpconnect/tests/mochitest/test_bug393269.html
layout/base/tests/chrome/test_bug495648.xul
layout/base/tests/chrome/test_printpreview.xul
layout/base/tests/chrome/test_printpreview_bug396024.xul
layout/base/tests/chrome/test_transformed_scrolling_repaints.html
layout/base/tests/test_bug93077-6.html
layout/base/tests/test_image_layers.html
layout/base/tests/test_mozPaintCount.html
layout/base/tests/test_reftests_with_caret.html
layout/base/tests/test_scroll_selection_into_view.html
layout/forms/test/test_bug536567_perwindowpb.html
layout/forms/test/test_bug665540.html
layout/generic/test/test_bug394239.html
layout/generic/test/test_bug469613.xul
layout/generic/test/test_bug469774.xul
layout/generic/test/test_bug508115.xul
layout/generic/test/test_bug514732-2.xul
layout/generic/test/test_bug632379.xul
layout/generic/test/test_selection_underline.html
layout/mathml/tests/test_bug553917.html
layout/style/test/test_pointer-events.html
layout/style/test/test_value_computation.html
parser/htmlparser/tests/mochitest/test_bug460437.xhtml
parser/htmlparser/tests/mochitest/test_bug613662.xhtml
security/manager/ssl/tests/mochitest/mixedcontent/test_bug472986.html
security/manager/ssl/tests/mochitest/mixedcontent/test_cssContent2.html
toolkit/components/aboutmemory/tests/test_aboutmemory.xul
toolkit/components/passwordmgr/test/test_notifications.html
toolkit/content/tests/chrome/test_bug437844.xul
toolkit/content/tests/chrome/test_bug509732.xul
toolkit/content/tests/chrome/test_bug557987.xul
toolkit/content/tests/chrome/test_bug562554.xul
toolkit/content/tests/chrome/test_bug570192.xul
toolkit/content/tests/chrome/test_bug585946.xul
toolkit/content/tests/chrome/test_bug624329.xul
toolkit/content/tests/chrome/test_bug792324.xul
toolkit/content/tests/chrome/test_button.xul
toolkit/content/tests/chrome/test_chromemargin.xul
toolkit/content/tests/chrome/test_closemenu_attribute.xul
toolkit/content/tests/chrome/test_colorpicker_popup.xul
toolkit/content/tests/chrome/test_contextmenu_list.xul
toolkit/content/tests/chrome/test_datepicker.xul
toolkit/content/tests/chrome/test_deck.xul
toolkit/content/tests/chrome/test_dialogfocus.xul
toolkit/content/tests/chrome/test_findbar.xul
toolkit/content/tests/chrome/test_findbar_events.xul
toolkit/content/tests/chrome/test_focus_anons.xul
toolkit/content/tests/chrome/test_hiddenitems.xul
toolkit/content/tests/chrome/test_hiddenpaging.xul
toolkit/content/tests/chrome/test_keys.xul
toolkit/content/tests/chrome/test_largemenu.xul
toolkit/content/tests/chrome/test_menu.xul
toolkit/content/tests/chrome/test_menuchecks.xul
toolkit/content/tests/chrome/test_menuitem_blink.xul
toolkit/content/tests/chrome/test_menuitem_commands.xul
toolkit/content/tests/chrome/test_menulist_keynav.xul
toolkit/content/tests/chrome/test_mousecapture.xul
toolkit/content/tests/chrome/test_notificationbox.xul
toolkit/content/tests/chrome/test_panel.xul
toolkit/content/tests/chrome/test_preferences.xul
toolkit/content/tests/widgets/test_mousecapture_area.html
toolkit/content/tests/widgets/test_videocontrols.html
toolkit/identity/tests/chrome/test_sandbox.xul
toolkit/mozapps/downloads/tests/chrome/test_bug_412360.xul
toolkit/mozapps/downloads/tests/chrome/test_bug_462172.xul
toolkit/mozapps/downloads/tests/chrome/test_cleanup_search.xul
toolkit/mozapps/downloads/tests/chrome/test_close_on_last_window.xul
toolkit/mozapps/downloads/tests/chrome/test_multiword_search.xul
toolkit/mozapps/downloads/tests/chrome/test_search_clearlist.xul
toolkit/mozapps/downloads/tests/chrome/test_search_keys.xul
toolkit/mozapps/downloads/tests/chrome/test_select_all.xul
widget/tests/test_bug538242.xul
widget/tests/test_composition_text_querycontent.xul
--- a/accessible/tests/mochitest/actions/test_general.xul
+++ b/accessible/tests/mochitest/actions/test_general.xul
@@ -16,16 +16,22 @@
           src="../common.js" />
   <script type="application/javascript"
           src="../events.js" />
   <script type="application/javascript"
           src="../actions.js" />
 
   <script type="application/javascript">
   <![CDATA[
+    if (navigator.platform.indexOf("Mac") == 0) {
+      SimpleTest.expectAssertions(0, 1);
+    } else {
+      SimpleTest.expectAssertions(1);
+    }
+
     function doTest()
     {
       var actionsArray = [
         {
           ID: "menu",
           actionName: "click",
           events: CLICK_EVENTS,
           // Wait for focus event, it guarantees us the submenu tree is created,
--- a/accessible/tests/mochitest/actions/test_link.html
+++ b/accessible/tests/mochitest/actions/test_link.html
@@ -12,16 +12,24 @@
   <script type="application/javascript"
           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.indexOf("Win") == 0) {
+      SimpleTest.expectAssertions(13);
+    } else if (navigator.platform.indexOf("Linux") == 0) {
+      SimpleTest.expectAssertions(18);
+    } else if (navigator.platform.indexOf("Mac") == 0) {
+      SimpleTest.expectAssertions(0, 14);
+    }
+
     function getAnchorTargetDocumentAcc()
     {
       var thisTabDocAcc = getTabDocAccessible();
       var thisDocTabPanelAcc = thisTabDocAcc.parent.parent;
       var tabPanelsAcc = thisDocTabPanelAcc.parent;
       var newDocTabPanelAcc = tabPanelsAcc.lastChild.firstChild;
       return newDocTabPanelAcc.firstChild;
     }
--- a/accessible/tests/mochitest/attributes/test_obj.html
+++ b/accessible/tests/mochitest/attributes/test_obj.html
@@ -14,16 +14,20 @@ https://bugzilla.mozilla.org/show_bug.cg
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
 
   <script type="application/javascript"
           src="../common.js"></script>
   <script type="application/javascript"
           src="../attributes.js"></script>
 
   <script type="application/javascript">
+    if (navigator.platform.indexOf("Linux") == 0) {
+      SimpleTest.expectAssertions(0, 1);
+    }
+
     function doTest()
     {
       // aria
       testAttrs("atomic", {"atomic" : "true"}, true);
       testAttrs("autocomplete", {"autocomplete" : "true"}, true);
       testAttrs("checkbox", {"checkable" : "true"}, true); 
       testAttrs("checkedCheckbox", {"checkable" : "true"}, true); 
       testAttrs("checkedMenuitem", {"checkable" : "true"}, true); 
--- a/accessible/tests/mochitest/editabletext/test_1.html
+++ b/accessible/tests/mochitest/editabletext/test_1.html
@@ -14,16 +14,22 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script type="application/javascript"
           src="../common.js"></script>
   <script type="application/javascript"
           src="../events.js"></script>
   <script type="application/javascript"
           src="editabletext.js"></script>
 
   <script type="application/javascript">
+    if (navigator.platform.indexOf("Mac") == 0) {
+      SimpleTest.expectAssertions(0, 3);
+    } else {
+      SimpleTest.expectAssertions(3);
+    }
+
     function addTestEditable(aID, aTestRun, aTrailChar)
     {
       var et = new editableTextTest(aID);
 
       //////////////////////////////////////////////////////////////////////////
       // setTextContents
       et.scheduleTest(et.setTextContents, "hello");
       et.scheduleTest(et.setTextContents, "olleh", aTrailChar); // due to some reason this reports '\n' in the end
--- a/accessible/tests/mochitest/events/test_focus_autocomplete.xul
+++ b/accessible/tests/mochitest/events/test_focus_autocomplete.xul
@@ -27,16 +27,19 @@
   <script type="application/javascript"
           src="../events.js" />
 
   <script type="application/javascript"
           src="../autocomplete.js" />
 
   <script type="application/javascript">
   <![CDATA[
+    if (navigator.platform.indexOf("Mac") != 0) {
+      SimpleTest.expectAssertions(2);
+    }
     ////////////////////////////////////////////////////////////////////////////
     // Hacky stuffs
 
     // This is the hack needed for searchbar work outside of browser.
     function getBrowser()
     {
       return {
         mCurrentBrowser: { engines: new Array() }
--- a/accessible/tests/mochitest/events/test_focus_browserui.xul
+++ b/accessible/tests/mochitest/events/test_focus_browserui.xul
@@ -19,16 +19,19 @@
           src="../states.js"></script>
   <script type="application/javascript"
           src="../events.js"></script>
   <script type="application/javascript"
           src="../browser.js"></script>
 
   <script type="application/javascript">
   <![CDATA[
+    if (navigator.platform.indexOf("Linux") == 0) {
+      SimpleTest.expectAssertions(1);
+    }
     ////////////////////////////////////////////////////////////////////////////
     // Helpers
 
     function inputInDocument()
     {
       var tabdoc = currentTabDocument();
       return tabdoc.getElementById("input");
     }
--- a/accessible/tests/mochitest/events/test_focus_doc.html
+++ b/accessible/tests/mochitest/events/test_focus_doc.html
@@ -16,16 +16,24 @@
   <script type="application/javascript"
     src="../events.js"></script>
   <script type="application/javascript"
           src="../role.js"></script>
     <script type="application/javascript"
       src="../states.js"></script>
 
   <script type="application/javascript">
+    if (navigator.platform.indexOf("Win") == 0) {
+      SimpleTest.expectAssertions(1, 2);
+    } else if (navigator.platform.indexOf("Linux") == 0) {
+      SimpleTest.expectAssertions(1);
+    } else if (navigator.platform.indexOf("Mac") == 0) {
+      SimpleTest.expectAssertions(0, 1);
+    }
+
     var gQueue = null;
 
     //var gA11yEventDumpID = "eventdump";
     //gA11yEventDumpToConsole = true;
 
     function doTests()
     {
       // setup
--- a/accessible/tests/mochitest/relations/test_ui_modalprompt.html
+++ b/accessible/tests/mochitest/relations/test_ui_modalprompt.html
@@ -17,16 +17,22 @@
   <script type="application/javascript"
           src="../role.js"></script>
   <script type="application/javascript"
           src="../events.js"></script>
   <script type="application/javascript"
           src="../browser.js"></script>
 
   <script type="application/javascript">
+    if (navigator.platform.indexOf("Mac") == 0) {
+      SimpleTest.expectAssertions(0, 1);
+    } else {
+      SimpleTest.expectAssertions(1);
+    }
+
     function hasTabModalPrompts() {
       try {
         return SpecialPowers.getBoolPref("prompts.tab_modal.enabled");
       } catch (ex) {
         return false;
       }
     }
 
--- a/accessible/tests/mochitest/text/test_singleline.html
+++ b/accessible/tests/mochitest/text/test_singleline.html
@@ -6,17 +6,22 @@
 
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
   <script type="application/javascript"
           src="../common.js"></script>
   <script type="application/javascript"
           src="../text.js"></script>
   <script type="application/javascript">
-    
+    if (navigator.platform.indexOf("Mac") == 0) {
+      SimpleTest.expectAssertions(0, 23);
+    } else {
+      SimpleTest.expectAssertions(23);
+    }
+
     function doTest()
     {
       // __h__e__l__l__o__ __m__y__ __f__r__i__e__n__d__
       //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
 
       ////////////////////////////////////////////////////////////////////////
       // characterCount
 
--- a/accessible/tests/mochitest/text/test_whitespaces.html
+++ b/accessible/tests/mochitest/text/test_whitespaces.html
@@ -8,17 +8,22 @@
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
   <script type="application/javascript"
           src="../common.js"></script>
 
   <script type="application/javascript"
           src="../text.js"></script>
   <script type="application/javascript">
-    
+    if (navigator.platform.indexOf("Mac") == 0) {
+      SimpleTest.expectAssertions(0, 10);
+    } else {
+      SimpleTest.expectAssertions(10);
+    }
+
     function doTest()
     {
       // __B__r__a__v__e__ __S__i__r__ __ __R__o__b__i__n__ __ __ __r__a__n
       //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21
 
       ////////////////////////////////////////////////////////////////////////
       // characterCount
 
--- a/accessible/tests/mochitest/text/test_words.html
+++ b/accessible/tests/mochitest/text/test_words.html
@@ -7,17 +7,22 @@
 
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
   <script type="application/javascript"
           src="../common.js"></script>
   <script type="application/javascript"
           src="../text.js"></script>
   <script type="application/javascript">
-    
+    if (navigator.platform.indexOf("Mac") == 0) {
+      SimpleTest.expectAssertions(0, 1);
+    } else {
+      SimpleTest.expectAssertions(1);
+    }
+
     function doTest()
     {
       // "one two"
       testWords("div1", ["one", "two"]);
 
       // "one  two"
       testWords("div2", ["one", "two"]);
 
--- a/accessible/tests/mochitest/tree/test_dockids.html
+++ b/accessible/tests/mochitest/tree/test_dockids.html
@@ -11,16 +11,20 @@
   <script type="application/javascript"
           src="../common.js"></script>
   <script type="application/javascript"
           src="../role.js"></script>
   <script type="application/javascript"
           src="../states.js"></script>
 
   <script type="application/javascript">
+  if (navigator.platform.indexOf("Win") == 0) {
+    SimpleTest.expectAssertions(0, 1);
+  }
+
   function doTest()
   {
     var tree =
      { DOCUMENT: [
        { PARAGRAPH: [ // head
          { PARAGRAPH: [ // link
            { STATICTEXT: [] }, // generated content
            { STATICTEXT: [] } // generated content
--- a/accessible/tests/mochitest/tree/test_txtctrl.xul
+++ b/accessible/tests/mochitest/tree/test_txtctrl.xul
@@ -13,16 +13,21 @@
           src="../common.js" />
   <script type="application/javascript"
           src="../role.js" />
   <script type="application/javascript"
           src="../events.js" />
 
   <script type="application/javascript">
   <![CDATA[
+    if (navigator.platform.indexOf("Mac") == 0) {
+      SimpleTest.expectAssertions(0, 1);
+    } else {
+      SimpleTest.expectAssertions(1);
+    }
     ////////////////////////////////////////////////////////////////////////////
     // Test
 
     function doTest()
     {
       ////////////////////
       // textbox
       ////////////////////
--- a/caps/tests/mochitest/test_principal_extendedorigin_appid_appstatus.html
+++ b/caps/tests/mochitest/test_principal_extendedorigin_appid_appstatus.html
@@ -17,16 +17,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 <script type="application/javascript;version=1.7">
 
 /** Test for Bug 758258 **/
 
 var Ci = Components.interfaces;
 
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(2);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 /*
  * gData is an array of objects. Each object represents a test case.
  * - app: gives the app manifest URL, will set mozapp to it on the iframe;
  * - origin: gives the origin of the iframe. This is the URL thas is going to
  *           to be passed as iframe.src but also the expected principal's
  *           origin.
--- a/content/base/test/test_bug527896.html
+++ b/content/base/test/test_bug527896.html
@@ -17,16 +17,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 527896 **/
 
 SimpleTest.waitForExplicitFinish();
 
+SimpleTest.expectAssertions(1);
+
 var docWrittenSrcExecuted = false;
 var scriptInsertedSrcExecuted = false;
 
 // the iframe test runs with the HTML5 parser
 
 var iframe = document.getElementsByTagName('iframe')[0];
 iframe.contentWindow.document.open();
 iframe.contentWindow.document.write("<!DOCTYPE html>");
--- a/content/base/test/test_bug548193.html
+++ b/content/base/test/test_bug548193.html
@@ -8,16 +8,18 @@
 <body>
 <p id="display"></p>
 <div id="content" style="display: none">
 </div>
 
 <iframe style="width:200px;height:200px;" id='cspframe'></iframe>
 <script class="testbody" type="text/javascript">
 
+SimpleTest.expectAssertions(1);
+
 // This is used to watch requests go out so we can see if the report is
 // sent correctly
 function examiner() {
   netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
   var obsvc = Components.classes['@mozilla.org/observer-service;1']
                         .getService(Components.interfaces.nsIObserverService);
   obsvc.addObserver(this, "http-on-modify-request", false);
 }
--- a/content/base/test/test_bug638112.html
+++ b/content/base/test/test_bug638112.html
@@ -11,16 +11,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=638112">Mozilla Bug 638112</a>
 <p id="display"></p>
 <div id="content" style="display: none">
 </div>
 <pre id="test">
 <script type="text/javascript">
 
+SimpleTest.expectAssertions(1);
+
 /** Test for Bug 638112 **/
 
 function run_test() {
   var req = new XMLHttpRequest();
   req.open("GET", "bug638112.sjs", false);
   req.send(null);
   var statusText = req.statusText;
 
--- a/content/base/test/test_mutationobservers.html
+++ b/content/base/test/test_mutationobservers.html
@@ -13,16 +13,21 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=641821">Mozilla Bug 641821</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) {
+  // for non-Windows
+  SimpleTest.expectAssertions(1);
+}
+
 /** Test for Bug 641821 **/
 
 var div = document.createElement("div");
 
 var M;
 if ("MozMutationObserver" in window) {
   M = window.MozMutationObserver;
 } else if ("WebKitMutationObserver" in window) {
--- a/content/events/test/test_bug457672.html
+++ b/content/events/test/test_bug457672.html
@@ -12,16 +12,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=457672">Mozilla Bug 457672</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
+SimpleTest.expectAssertions(1);
+
 /** Test for Bug 457672 **/
 
 var windowBlurCount = 0;
 
 function setUserPref(reset) {
   netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
   const prefSvcContractID = "@mozilla.org/preferences-service;1";
   const prefSvcIID = Components.interfaces.nsIPrefService;
--- a/content/html/content/test/forms/test_meter_element.html
+++ b/content/html/content/test/forms/test_meter_element.html
@@ -16,16 +16,22 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="content" style="visibility: hidden;">
   <form id='f' method='get' target='submit_frame' action='foo'>
     <meter id='m' value=0.5></meter>
   </form>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+} else {
+  SimpleTest.expectAssertions(1);
+}
+
 /** Test for <meter> **/
 
 function checkFormIDLAttribute(aElement)
 {
   is('form' in aElement, false, "<meter> shouldn't have a form attribute");
 }
 
 function checkAttribute(aElement, aAttribute, aNewValue, aExpectedValueForIDL)
--- a/content/html/content/test/forms/test_progress_element.html
+++ b/content/html/content/test/forms/test_progress_element.html
@@ -18,16 +18,18 @@ and
 <div id="content" style="visibility: hidden;">
   <form id='f' method='get' target='submit_frame' action='foo'>
     <progress id='p'></progress>
   </form>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
+SimpleTest.expectAssertions(1);
+
 /** Test for progress element content and layout **/
 
 function checkFormIDLAttribute(aElement)
 {
   is("form" in aElement, false, "<progress> shouldn't have a form attribute");
 }
 
 function checkAttribute(aElement, aAttribute, aNewValue, aExpectedValueForIDL)
--- a/content/html/content/test/test_bug242709.html
+++ b/content/html/content/test/test_bug242709.html
@@ -12,16 +12,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=242709">Mozilla Bug 242709</a>
 <p id="display"></p>
 <div id="content">
 <iframe src="bug242709_iframe.html" id="a"></iframe> 
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+SimpleTest.expectAssertions(1);
+
 /** Test for Bug 242709 **/
 
 SimpleTest.waitForExplicitFinish();
 
 var submitted = function() {
   ok(true, "Disabling button after form submission doesn't prevent submitting");
   SimpleTest.finish();
 }
--- a/content/html/content/test/test_bug277890.html
+++ b/content/html/content/test/test_bug277890.html
@@ -12,16 +12,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=277890">Mozilla Bug 277890</a>
 <p id="display"></p>
 <div id="content">
 <iframe src="bug277890_iframe.html" id="a"></iframe> 
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+SimpleTest.expectAssertions(1);
+
 /** Test for Bug 277890 **/
 
 SimpleTest.waitForExplicitFinish();
 
 var submitted = function() {
   ok(true, "Disabling button after form submission doesn't prevent submitting");
   SimpleTest.finish();
 }
--- a/content/html/content/test/test_bug523771.html
+++ b/content/html/content/test/test_bug523771.html
@@ -14,16 +14,23 @@ https://bugzilla.mozilla.org/show_bug.cg
 <iframe name="target_iframe" id="target_iframe"></iframe>
 <form action="form_submit_server.sjs" target="target_iframe" id="form"
 method="POST" enctype="multipart/form-data">
   <input id=singleFile name=singleFile type=file>
   <input id=multiFile name=multiFile type=file multiple>
 </form>
 <pre id="test">
 <script class="testbody" type="text/javascript">
+
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+} else {
+  SimpleTest.expectAssertions(1);
+}
+
 var filesToKill = [];
 singleFileInput = document.getElementById('singleFile');
 multiFileInput = document.getElementById('multiFile');
 var input1File = { name: "523771_file1", type: "", body: "file1 contents"};
 var input2Files =
   [{ name: "523771_file2", type: "", body: "second file contents" },
    { name: "523771_file3.txt", type: "text/plain", body: "123456" },
    { name: "523771_file4.html", type: "text/html", body: "<html>content</html>" }
--- a/content/html/content/test/test_iframe_sandbox_general.html
+++ b/content/html/content/test/test_iframe_sandbox_general.html
@@ -7,16 +7,19 @@ Implement HTML5 sandbox attribute for IF
 <head>
   <meta charset="utf-8">
   <title>Test for Bug 341604</title>
   <script type="application/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"/>
 </head>
 <script type="application/javascript">
+
+SimpleTest.expectAssertions(1);
+
 /** Test for Bug 341604 - Implement HTML5 sandbox attribute for IFRAMEs - general tests **/
 
 SimpleTest.waitForExplicitFinish();
 
 // a postMessage handler that is used by sandboxed iframes without
 // 'allow-same-origin' to communicate pass/fail back to this main page.
 // it expects to be called with an object like {ok: true/false, desc:
 // <description of the test> which it then forwards to ok()
--- a/content/html/content/test/test_iframe_sandbox_navigation.html
+++ b/content/html/content/test/test_iframe_sandbox_navigation.html
@@ -7,16 +7,19 @@ Implement HTML5 sandbox attribute for IF
 <head>
   <meta charset="utf-8">
   <title>Test for Bug 341604 - navigation</title>
   <script type="application/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"/>
 </head>
 <script type="application/javascript">
+
+SimpleTest.expectAssertions(1, 2);
+
 /** Test for Bug 341604 - Implement HTML5 sandbox attribute for IFRAMEs **/
 /** Navigation tests **/
 
 SimpleTest.waitForExplicitFinish();
 // a postMessage handler that is used by sandboxed iframes without
 // 'allow-same-origin'/other windows to communicate pass/fail back to this main page.
 // it expects to be called with an object like {ok: true/false, desc:
 // <description of the test> which it then forwards to ok()
--- a/content/html/document/test/test_bug391777.html
+++ b/content/html/document/test/test_bug391777.html
@@ -8,16 +8,21 @@ 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=391777">Mozilla Bug 391777</a>
 <p id="display"></p>
 <script class="testbody" type="text/javascript">
 
+if (navigator.platform.indexOf("Win") != 0) {
+  // not Windows
+  SimpleTest.expectAssertions(0, 1);
+}
+
 /** Test for Bug 391777 **/
 var arg = {};
 arg.testVal = "foo";
 var result = window.showModalDialog("javascript:window.returnValue = window.dialogArguments.testVal; window.close(); 'This window should close on its own.';", arg);
 ok(true, "We should get here without user interaction");
 is(result, "foo", "Unexpected result from showModalDialog");
 </script>
 </body>
--- a/content/html/document/test/test_bug402680.html
+++ b/content/html/document/test/test_bug402680.html
@@ -16,16 +16,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <p id="display"></p>
 <div id="content">
   <input type="text">
   <textarea></textarea>
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+if (navigator.platform.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 /** Test for Bug 402680 **/
 
 ok(activeElementIsNull,
    "Before document has body, active element should be null");
 
 function testActiveElement() {
   ok(document.body == document.activeElement,
      "After page load body element should be the active element!");
--- a/content/html/document/test/test_bug403868.html
+++ b/content/html/document/test/test_bug403868.html
@@ -12,16 +12,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=403868">Mozilla Bug 403868</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);
+}
+
 /** Test for Bug 403868 **/
 function createSpan(id, insertionPoint) {
   var s = document.createElement("span");
   s.id = id;
   $("content").insertBefore(s, insertionPoint);
   return s;
 }
 
--- a/content/html/document/test/test_bug446483.html
+++ b/content/html/document/test/test_bug446483.html
@@ -12,16 +12,21 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=446483">Mozilla Bug 446483</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) {
+  // not Windows
+  SimpleTest.expectAssertions(0, 1);
+}
+
 /** Test for Bug 446483 **/
 
 function gc() {
   netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
   window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
         .getInterface(Components.interfaces.nsIDOMWindowUtils)
         .garbageCollect();
 }
--- a/content/html/document/test/test_bug448564.html
+++ b/content/html/document/test/test_bug448564.html
@@ -15,16 +15,18 @@ https://bugzilla.mozilla.org/show_bug.cg
   <iframe src="bug448564-iframe-2.html"></iframe>
   <iframe src="bug448564-iframe-3.html"></iframe>
 </p>
 <div id="content" style="display: none">
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+SimpleTest.expectAssertions(3);
+
 /** Test for Bug 448564 **/
 
 /**
  * The three iframes are going to be loaded with some dirty constructed forms.
  * Each of them will be submitted before the load event and a SJS will replace
  * the frame content with the query string.
  * Then, on the load event, our test file will check the content of each iframes
  * and check if the query string were correctly formatted (implying that all
--- a/content/html/document/test/test_bug478251.html
+++ b/content/html/document/test/test_bug478251.html
@@ -12,16 +12,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=478251">Mozilla Bug 478251</a>
 <p id="display"><iframe id="t"></iframe></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
+SimpleTest.expectAssertions(10);
+
 /** Test for Bug 478251 **/
 var doc = $("t").contentDocument;
 doc.open();
 doc.write();
 doc.close();
 is(doc.documentElement.textContent, "", "Writing || failed");
 
 doc.open();
--- a/content/html/document/test/test_bug741266.html
+++ b/content/html/document/test/test_bug741266.html
@@ -13,16 +13,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=741266">Mozilla Bug 741266</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
+SimpleTest.expectAssertions(1);
+
 /** Test for Bug 741266 **/
 var w = window.open("", "", "width=100,height=100");
 is(w.innerHeight, 100, "Popup height should be 100 when opened with window.open");
 // XXXbz On at least some platforms, the innerWidth is off by the scrollbar
 // width for some reason.  So just make sure it's the same for both popups.
 var width = w.innerWidth;
 w.close();
 w = document.open("", "", "width=100,height=100");
--- a/content/html/document/test/test_document-element-inserted.html
+++ b/content/html/document/test/test_document-element-inserted.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" />
 </head>
 <body>
 <iframe id = 'media'>
 </iframe>
 <pre id="test">
 <script class="testbody" type="text/javascript">
+
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 4);
+}
+
 SimpleTest.waitForExplicitFinish();
 var loc;
 
 var observe = function(doc){
     if (doc == media.contentDocument) {
         ok(media.contentDocument.location.toString().indexOf(loc) != -1,
           "The loaded media should be " + loc);
         next();
--- a/content/media/test/test_bug495300.html
+++ b/content/media/test/test_bug495300.html
@@ -10,16 +10,21 @@ https://bugzilla.mozilla.org/show_bug.cg
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <script type="text/javascript" src="manifest.js"></script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=495300">Mozilla Bug 495300</a>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+if (navigator.platform.indexOf("Mac") != 0) {
+  // not Mac
+  SimpleTest.expectAssertions(0, 1);
+}
+
 var manager = new MediaTestManager;
 
 function filename(uri) {
   return uri.substr(uri.lastIndexOf("/")+1);
 }
 
 function mediaEnded(event) {
   ok(true, "Got expected 'ended' event: " + filename(event.target.currentSrc));
--- a/content/media/test/test_bug686942.html
+++ b/content/media/test/test_bug686942.html
@@ -10,16 +10,20 @@ https://bugzilla.mozilla.org/show_bug.cg
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <script type="text/javascript" src="manifest.js"></script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=686942">Mozilla Bug 686942</a>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 var manager = new MediaTestManager;
 
 function onloaded(event) {
   var v = event.target;
   v.currentTime = v.duration;
   return;
 }
 
--- a/content/media/test/test_playback_rate.html
+++ b/content/media/test/test_playback_rate.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='application/javascript;version=1.8'>
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 let manager = new MediaTestManager;
 
 function rangeCheck(lhs, rhs, threshold) {
   var diff = Math.abs(lhs - rhs);
   if (diff < threshold) {
     return true;
   }
   return false;
--- a/content/media/test/test_seek.html
+++ b/content/media/test/test_seek.html
@@ -18,16 +18,18 @@
   <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);
+
 var manager = new MediaTestManager;
 
 const NUM_SEEK_TESTS = 13;
 
 function createTestArray() {
   var tests = [];
   var tmpVid = document.createElement("video");
 
--- a/content/media/test/test_seek_out_of_range.html
+++ b/content/media/test/test_seek_out_of_range.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.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 var manager = new MediaTestManager;
 
 // Test if the ended event works correctly.
 
 function startTest(e) {
   var v = e.target;
   checkMetadata(v._name, v, v._test);
   is(v._loadedMetadata, false, "Should only receive one loadedmetadata event for " + v._name);
--- a/content/xbl/test/test_bug378518.xul
+++ b/content/xbl/test/test_bug378518.xul
@@ -40,16 +40,18 @@ https://bugzilla.mozilla.org/show_bug.cg
   <box id="myExtendedBox" command="myExtendedBoxCommand"
     style="-moz-binding:url(#mybinding)">
     <label>myExtendedBox</label>
   </box>
 
   <!-- test code goes here -->
   <script type="application/javascript"> <![CDATA[
 
+    SimpleTest.expectAssertions(1);
+
     var myBoxClicked = false;
     var myCheckBoxClicked = false;
     var myExtendedBoxClicked = false;
 
     function testClick(elemName) {
       netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
       var wu  =
         window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
--- a/content/xul/templates/tests/chrome/test_tmpl_listboxelement.xul
+++ b/content/xul/templates/tests/chrome/test_tmpl_listboxelement.xul
@@ -44,16 +44,18 @@
       <listcell label=""/>
     </listitem>
   </data>
 
 <script src="templates_shared.js"/>
 
 <script>
 <![CDATA[
+SimpleTest.expectAssertions(4);
+
 SimpleTest.waitForExplicitFinish();
 
 var testid ="listbox element";
 var queryType = "rdf";
 var isTreeBuilder = false;
 var needsOpen = false;
 var notWorkingYet = false;
 var notWorkingYetDynamic = false;
--- a/content/xul/templates/tests/chrome/test_tmpl_storage_dynamicparameters.xul
+++ b/content/xul/templates/tests/chrome/test_tmpl_storage_dynamicparameters.xul
@@ -21,16 +21,18 @@
     <listitem anyid="true" label="Emu"/>
     <listitem anyid="true" label="Raven"/>
   </data>
 
 <script src="templates_shared.js"/>
 
 <script>
 <![CDATA[
+SimpleTest.expectAssertions(1, 2);
+
 SimpleTest.waitForExplicitFinish();
 
 copyToProfile('animals.sqlite');
 
 function test_storage_template()
 {
   var root = document.getElementById("root");
   expectedOutput = document.getElementById("output");
--- a/docshell/test/chrome/test_bug303267.xul
+++ b/docshell/test/chrome/test_bug303267.xul
@@ -23,16 +23,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 </pre>
 </body>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
+SimpleTest.expectAssertions(0, 1);
+
 /** Test for Bug 303267 **/
 
 SimpleTest.waitForExplicitFinish();
 window.open("bug303267_window.xul", "bug303267",
             "chrome,width=600,height=600");
 
 ]]>
 </script>
--- a/docshell/test/chrome/test_bug456980.xul
+++ b/docshell/test/chrome/test_bug456980.xul
@@ -15,16 +15,18 @@ https://bugzilla.mozilla.org/show_bug.cg
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml">
   <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=456980"
      target="_blank">Mozilla Bug 396519</a>
   </body>
 
   <!-- test code goes here -->
   <script type="application/javascript"><![CDATA[
+    SimpleTest.expectAssertions(1);
+
     SimpleTest.waitForExplicitFinish();
 
     addLoadEvent(function() {
       window.open("bug113934_window.xul?chrome", "bug456980",
                   "chrome,width=800,height=800");
     });
 
   ]]></script>
--- a/docshell/test/chrome/test_bug608669.xul
+++ b/docshell/test/chrome/test_bug608669.xul
@@ -34,16 +34,17 @@ function setCachePref(enabled) {
     gOrigMaxTotalViewers = undefined;
     try {
       prefBranch.clearUserPref("browser.sessionhistory.cache_subframes");
     } catch (e) { /* Pref didn't exist, meh */ }
   }
 }
 
 
+SimpleTest.expectAssertions(1);
 
     /** Test for Bug 608669 **/
 SimpleTest.waitForExplicitFinish();
 
 addLoadEvent(nextTest);
 
 gen = doTest();
 
--- a/docshell/test/chrome/test_mozFrameType.xul
+++ b/docshell/test/chrome/test_mozFrameType.xul
@@ -22,16 +22,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 </pre>
 </body>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 /** Test for Bug 769771 **/
 SimpleTest.waitForExplicitFinish();
 
 addLoadEvent(function () {
   window.open("mozFrameType_window.xul", "mozFrameType",
               "chrome,width=600,height=600");
 });
 
--- a/docshell/test/navigation/test_child.html
+++ b/docshell/test/navigation/test_child.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.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 window.onload = function() {
   navigateByLocation(frames[0]);
   navigateByOpen("child1");
   navigateByForm("child2");
   navigateByHyperlink("child3");
 
   xpcWaitForFinishedFrames(function() {
     isNavigated(frames[0], "Should be able to navigate off-domain child by setting location.");
--- a/docshell/test/navigation/test_grandchild.html
+++ b/docshell/test/navigation/test_grandchild.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: 200px; }
     </style>
 <script>
+if (navigator.platform.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 window.onload = function () {
   navigateByLocation(frames[0].frames[0]);
   navigateByOpen("child1_child0");
   navigateByForm("child2_child0");
   navigateByHyperlink("child3_child0");
 
   xpcWaitForFinishedFrames(function() {
     isNavigated(frames[0].frames[0], "Should be able to navigate off-domain grandchild by setting location.");
--- a/docshell/test/navigation/test_reserved.html
+++ b/docshell/test/navigation/test_reserved.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: 200px; }
     </style>
 <script>
+if (navigator.platform.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 2);
+}
+
 function testTop() {
   window0 = window.open("iframe.html#http://test1.example.org:80/tests/docshell/test/navigation/navigate.html#top,location", "_blank", "width=10,height=10");
 
   xpcWaitForFinishedFrames(function() {
     isInaccessible(window0, "Should be able to navigate off-domain top by setting location.");
     window0.close();
     xpcCleanupWindows();
 
--- a/docshell/test/test_bug580069.html
+++ b/docshell/test/test_bug580069.html
@@ -10,16 +10,19 @@ 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=580069">Mozilla Bug 580069</a>
 
 <iframe id='iframe' src='file_bug580069_1.html'></iframe>
 
 <script type="application/javascript">
+
+SimpleTest.expectAssertions(1);
+
 SimpleTest.waitForExplicitFinish();
 
 var iframe = document.getElementById('iframe');
 var iframeCw = iframe.contentWindow;
 
 // Called when file_bug580069_1.html loads.
 function page1Load() {
   // This should cause us to load file 2.
--- a/docshell/test/test_bug668513.html
+++ b/docshell/test/test_bug668513.html
@@ -3,16 +3,20 @@
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=668513
 -->
 <head>
   <title>Test for Bug 668513</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 <script>
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
   function onload_test()
   {
     var win = frames[0];
     ok(win.performance, 'Window.performance should be defined');
     ok(win.performance.navigation, 'Window.performance.navigation should be defined');
     var navigation = win.performance && win.performance.navigation;
     if (navigation === undefined)
     {
--- a/dom/bindings/test/test_bug773326.html
+++ b/dom/bindings/test/test_bug773326.html
@@ -1,11 +1,16 @@
 <!doctype html>
 <meta charset=utf-8>
 <title>Test for Bug 773326</title>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <div id=log></div>
 <script>
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(0, 2);
+} else {
+  SimpleTest.expectAssertions(2);
+}
 test(function() {
   new Worker("data:text/javascript,new XMLHttpRequest(42)");
 }, "Should not crash")
 </script>
--- a/dom/browser-element/mochitest/test_browserElement_inproc_PurgeHistory.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_PurgeHistory.html
@@ -2,12 +2,15 @@
 <html>
 <head>
   <title>Test of browser element.</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <script type="application/javascript" src="browserElementTestHelpers.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <body>
+<script type="application/javascript;version=1.7">
+SimpleTest.expectAssertions(1);
+</script>
 <script type="application/javascript;version=1.7" src="browserElement_PurgeHistory.js">
 </script>
 </body>
 </html>
--- a/dom/encoding/test/test_TextDecoder.html
+++ b/dom/encoding/test/test_TextDecoder.html
@@ -8,16 +8,18 @@
   <script type="text/javascript" src="test_TextDecoder.js"></script>
   <script type="text/javascript" src="test_BOMEncoding.js"></script>
   <script type="text/javascript" src="worker_helper.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script>
 
+SimpleTest.expectAssertions(0, 2);
+
 setup({explicit_done: true});
 runTest();
 
 function runTest()
 {
   runTextDecoderOptions();
   runTextDecoderBOMEnoding();
 }
--- a/dom/encoding/test/test_TextEncoder.html
+++ b/dom/encoding/test/test_TextEncoder.html
@@ -7,16 +7,22 @@
   <script type="text/javascript" src="/resources/testharnessreport.js"></script>
   <script type="text/javascript" src="test_TextEncoder.js"></script>
   <script type="text/javascript" src="worker_helper.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script>
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 2);
+} else {
+  SimpleTest.expectAssertions(2);
+}
+
 setup({explicit_done: true});
 runTest();
 
 function runTest()
 {
   runTextEncoderTests();
 }
 
--- a/dom/media/tests/mochitest/test_getUserMedia_basicAudio.html
+++ b/dom/media/tests/mochitest/test_getUserMedia_basicAudio.html
@@ -15,16 +15,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=781534">mozGetUserMedia Basic Audio Test</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   <audio id="testAudio"></audio>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
   /**
    * Run a test to verify that we can complete a start and stop media playback
    * cycle for an audio LocalMediaStream on an audio HTMLMediaElement.
    */
   runTest(function () {
     var testAudio = document.getElementById('testAudio');
 
     getUserMedia({audio: true}, function (aStream) {
--- a/dom/media/tests/mochitest/test_getUserMedia_basicVideo.html
+++ b/dom/media/tests/mochitest/test_getUserMedia_basicVideo.html
@@ -15,16 +15,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=781534">mozGetUserMedia Basic Video Test</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   <video id="testVideo"></video>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
   /**
    * Run a test to verify that we can complete a start and stop media playback
    * cycle for an video LocalMediaStream on a video HTMLMediaElement.
    */
   runTest(function () {
     var testVideo = document.getElementById('testVideo');
 
     getUserMedia({video: true}, function (aStream) {
--- a/dom/media/tests/mochitest/test_getUserMedia_basicVideoAudio.html
+++ b/dom/media/tests/mochitest/test_getUserMedia_basicVideoAudio.html
@@ -15,16 +15,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=781534">mozGetUserMedia Basic Video & Audio Test</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   <video id="testVideoAudio"></video>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
   /**
    * Run a test to verify that we can complete a start and stop media playback
    * cycle for a video and audio LocalMediaStream on a video HTMLMediaElement.
    */
   runTest(function () {
     var testVideoAudio = document.getElementById('testVideoAudio');
 
     getUserMedia({video: true, audio: true}, function (aStream) {
--- a/dom/media/tests/mochitest/test_getUserMedia_exceptions.html
+++ b/dom/media/tests/mochitest/test_getUserMedia_exceptions.html
@@ -14,16 +14,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=795367">Test mozGetUserMedia Exceptions</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, 1);
+}
+
 /**
   These tests verify that the appropriate exception is thrown when incorrect
   values are provided to the immediate mozGetUserMedia call.
 */
 var exceptionTests = [
   // Each test here verifies that a caller is required to have all
   // three arguments in order to call mozGetUserMedia
   { params: undefined,
--- a/dom/media/tests/mochitest/test_getUserMedia_stopVideoAudioStream.html
+++ b/dom/media/tests/mochitest/test_getUserMedia_stopVideoAudioStream.html
@@ -15,16 +15,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=822109">mozGetUserMedia Stop Video Audio Stream</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   <video id="testVideo"></video>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 2);
+}
+
   /**
    * Run a test to verify that we can start a video+audio stream in a
    * media element, call stop() on the stream, and successfully get an
    * ended event fired.
    */
   runTest(function () {
     getUserMedia({video: true, audio: true}, function(stream) {
       var testVideo = document.getElementById('testVideo');
--- a/dom/media/tests/mochitest/test_peerConnection_basicAudioVideo.html
+++ b/dom/media/tests/mochitest/test_peerConnection_basicAudioVideo.html
@@ -18,16 +18,23 @@ https://bugzilla.mozilla.org/show_bug.cg
   <audio id="audioLocal" controls></audio>
 
   <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.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 9);
+} else {
+  SimpleTest.expectAssertions(0, 1);
+}
+
   var audioLocal;
   var audioPCLocal;
   var audioPCRemote;
 
   var videoLocal;
   var videoPCLocal;
   var videoPCRemote;
 
--- a/dom/media/tests/mochitest/test_peerConnection_basicAudioVideoCombined.html
+++ b/dom/media/tests/mochitest/test_peerConnection_basicAudioVideoCombined.html
@@ -18,16 +18,21 @@ https://bugzilla.mozilla.org/show_bug.cg
   <audio id="audioLocal" controls></audio>
 
   <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.indexOf("Linux") != 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
   var audioLocal;
   var videoLocal;
   var videoPCLocal;
   var videoPCRemote;
 
   var pcLocal;
   var pcRemote;
 
--- a/dom/network/tests/test_network_basics.html
+++ b/dom/network/tests/test_network_basics.html
@@ -7,16 +7,18 @@
 </head>
 <body>
 <p id="display"></p>
 <div id="content" style="display: none">
 </div>
 <pre id="test">
 <script type="application/javascript">
 
+SimpleTest.expectAssertions(11);
+
 /** Test for Network API **/
 
 function checkInterface(aInterface) {
   ok(!(aInterface in window), aInterface + " should be prefixed");
   ok(("Moz" + aInterface) in window, aInterface + " should be prefixed");
 }
 
 ok('mozConnection' in navigator, "navigator.mozConnection should exist");
--- a/dom/network/tests/test_tcpsocket_enabled_with_perm.html
+++ b/dom/network/tests/test_tcpsocket_enabled_with_perm.html
@@ -7,16 +7,20 @@
 </head>
 <body>
 <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 to ensure TCPSocket permission being turned on enables 
   navigator.mozTCPSocket, and mozTCPSocket.open works when
   the tcp-socket permission has been granted.
 **/
 SpecialPowers.setBoolPref("dom.mozTCPSocket.enabled", true);
 SpecialPowers.addPermission("tcp-socket", true, document);
 
 ok('mozTCPSocket' in navigator, "navigator.mozTCPSocket should be accessible if dom.mozTCPSocket.enabled is true");
--- a/dom/plugins/test/mochitest/test_GCrace.html
+++ b/dom/plugins/test/mochitest/test_GCrace.html
@@ -15,16 +15,22 @@
 
     function start() {
       if (!SimpleTest.testPluginIsOOP()) {
         ok(true, "Skipping this test when test plugin is not OOP.");
         SimpleTest.finish();
         return;
       }
       else {
+        if (navigator.platform.indexOf("Win") == 0) {
+          SimpleTest.expectAssertions(0, 66);
+        } else {
+          SimpleTest.expectAssertions(0, 1);
+        }
+
         setTimeout(checkGCRace, 1000);
       }
     }
 
     var nested = false;
 
     function cb(f) {
       ok(!nested, "Callback shouldn't occur in a nested stack frame");
--- a/dom/plugins/test/mochitest/test_cocoa_focus.html
+++ b/dom/plugins/test/mochitest/test_cocoa_focus.html
@@ -1,16 +1,18 @@
 <html>
 <head>
   <title>NPCocoaEventFocusChanged Tests</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
 </head>
 
 <body onload="runTests()">
   <script class="testbody" type="application/javascript">
+    SimpleTest.expectAssertions(1);
+
     SimpleTest.waitForExplicitFinish();
 
     var gOtherWindow;
 
     function runTests() {
       // We have to have two top-level windows in play in order to run these tests.
       gOtherWindow = window.open("cocoa_focus.html", "", "width=250,height=250");
     }
--- a/dom/plugins/test/mochitest/test_cookies.html
+++ b/dom/plugins/test/mochitest/test_cookies.html
@@ -2,16 +2,19 @@
 <head>
   <title>NPAPI Cookie Tests</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
 </head>
 
 <body onload="runTests()">
   <embed id="plugin1" type="application/x-test" width="400" height="400"></embed>
   <script class="testbody" type="application/javascript">
+if (navigator.platform.indexOf("Mac") != 0) {
+  SimpleTest.expectAssertions(1);
+}
     SimpleTest.waitForExplicitFinish();
     function runTests() {
       var pluginElement = document.getElementById("plugin1");
       pluginElement.setCookie("foo");
       is(pluginElement.getCookie(), "foo", "Cookie was set and retrieved correctly via NPAPI.");
       SimpleTest.finish();
     }
   </script>
--- a/dom/plugins/test/mochitest/test_pluginstream_seek_close.html
+++ b/dom/plugins/test/mochitest/test_pluginstream_seek_close.html
@@ -1,16 +1,20 @@
 <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.indexOf("Linux") == 0) {
+    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,16 +5,22 @@
           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.indexOf("Win") == 0) {
+    SimpleTest.expectAssertions(1, 2);
+  } else {
+    SimpleTest.expectAssertions(1);
+  }
+
   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_bug291653.html
+++ b/dom/tests/mochitest/bugs/test_bug291653.html
@@ -12,16 +12,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=291653">Mozilla Bug 291653</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, 1);
+}
+
 /** Test for Bug 291653 **/
 SimpleTest.waitForExplicitFinish();
 
 var secondListenerDidRun = false;
 
 var w = window.open("file_bug291653.html", "foo", "width=300,height=300");
 
 function closeTest() {
--- a/dom/tests/mochitest/bugs/test_bug304459.html
+++ b/dom/tests/mochitest/bugs/test_bug304459.html
@@ -12,16 +12,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=304459">Mozilla Bug 304459</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   <iframe id="frame"></iframe>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 /** Test for Bug 304459 **/
 
 function iframeLoaded()
 {
   var frame = document.getElementById("frame");
   frame.onload = undefined;
   frame.src = "http://example.org/tests/dom/tests/mochitest/bugs/iframe_bug304459-2.html";
 }
--- a/dom/tests/mochitest/bugs/test_bug308856.html
+++ b/dom/tests/mochitest/bugs/test_bug308856.html
@@ -12,16 +12,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=308856">Mozilla Bug 308856</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 308856 **/
 
 var monkey = 12;
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
   is(12,window.monkey,"Window global is correct value");
   var found = false;
--- a/dom/tests/mochitest/bugs/test_bug327891.html
+++ b/dom/tests/mochitest/bugs/test_bug327891.html
@@ -12,16 +12,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=327891">Mozilla Bug 327891</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);
+}
+
 var pass = false;
 
 try {
   new HTMLDocument();
 } catch(e) {
   pass = true;
 }
 
--- a/dom/tests/mochitest/bugs/test_bug333983.html
+++ b/dom/tests/mochitest/bugs/test_bug333983.html
@@ -12,16 +12,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=333983">Mozilla Bug 333983</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);
+}
+
 /** Test for Bug 333983 **/
 HTMLElement.prototype.foopy = function () { return "foopy"; }
 
 var foopy = "";
 try {
   foopy = document.body.foopy()
 } catch (ex) {
   foopy = ex + "";
--- a/dom/tests/mochitest/bugs/test_bug342448.html
+++ b/dom/tests/mochitest/bugs/test_bug342448.html
@@ -14,16 +14,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=342448">Mozilla Bug 342448</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);
+}
+
 /** Test for Bug 342448 **/
 SimpleTest.waitForExplicitFinish();
 try {
 setTimeout(1, 0);
 } catch (ex) {}
 callLater(.1, function() { ok(true, "shouldn't crash when passing a number as the first arg to setTimeout"); SimpleTest.finish(); })
 
 
--- a/dom/tests/mochitest/bugs/test_bug346659.html
+++ b/dom/tests/mochitest/bugs/test_bug346659.html
@@ -12,16 +12,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=346659">Mozilla Bug 346659</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, 1);
+}
+
 /** Test for Bug 346659 **/
 // do the tests in two batches, because otherwise the popup blocker kills off
 // our test because it opens too many windows.
 var numTestsSet1 = 6;
 var numTestsSet2 = 4;
 var numTestsSet3 = 2;
 var complete = 0;
 SimpleTest.waitForExplicitFinish();
--- a/dom/tests/mochitest/bugs/test_bug406375.html
+++ b/dom/tests/mochitest/bugs/test_bug406375.html
@@ -12,16 +12,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=406375">Mozilla Bug 406375</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(2, 3);
+}
+
 /** Test for Bug 406375 **/
 
 
 SimpleTest.waitForExplicitFinish();
 
 function runTest() {
   window.showModalDialog("file_bug406375.html");
   ok(true, "This test should not hang");
--- a/dom/tests/mochitest/bugs/test_bug411103.html
+++ b/dom/tests/mochitest/bugs/test_bug411103.html
@@ -18,16 +18,20 @@ 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,16 +7,20 @@ 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);
+}
+
 /** Test for Bug 414291 **/
 
 var result1 = 0;
 var result2 = 0;
 var result3 = 0;
 
 window.open("data:text/html,<html><body onload='close(); opener.result1 = 1;'>", "w1");
 is(result1, 0, "window either opened as modal or loaded synchronously.");
--- a/dom/tests/mochitest/bugs/test_bug427744.html
+++ b/dom/tests/mochitest/bugs/test_bug427744.html
@@ -12,16 +12,20 @@ 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,16 +17,20 @@ 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,16 +12,20 @@ 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,16 +5,20 @@ 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);
+}
+
   /** 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,16 +8,20 @@ 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,16 +14,22 @@ 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,16 +16,22 @@ 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,16 +12,20 @@ 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,16 +17,22 @@ 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,16 +11,22 @@ 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,16 +13,22 @@ 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,16 +19,20 @@ 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,16 +32,22 @@ 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,16 +10,22 @@ 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
@@ -7,16 +7,20 @@ https://bugzilla.mozilla.org/show_bug.cg
   <title>Test for Bug 504862</title>
   <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);
+}
+
 /** Test for Bug 504862 **/
 SimpleTest.waitForExplicitFinish();
 function onMsgRcv(event)
 {
   is(event.data, "args: undefined", "Unexpected cross origin dialog arguments.");
 }
 
 function runTest() {
--- a/dom/tests/mochitest/bugs/test_bug529328.html
+++ b/dom/tests/mochitest/bugs/test_bug529328.html
@@ -10,16 +10,21 @@ 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,16 +12,20 @@ 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,16 +12,20 @@ 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,16 +12,20 @@ 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,16 +11,22 @@ 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,16 +13,20 @@ 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,16 +13,20 @@ 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,16 +12,20 @@ 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,14 +21,18 @@ 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,16 +12,20 @@ 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,16 +12,20 @@ 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,16 +13,20 @@ 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,16 +8,20 @@ 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,16 +9,20 @@ 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,16 +16,18 @@ 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.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,16 +12,20 @@ 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,16 +12,20 @@ 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,15 +1,22 @@
 <!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,16 +17,20 @@ 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,16 +10,20 @@ 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,16 +33,20 @@ 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,16 +14,20 @@ 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,16 +13,20 @@ 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);
     }
--- a/dom/tests/mochitest/chrome/test_focus.xul
+++ b/dom/tests/mochitest/chrome/test_focus.xul
@@ -5,16 +5,20 @@
 <window title="Focus Tests"
   onload="setTimeout(runTest, 0);"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
 
 <script>
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 SimpleTest.waitForExplicitFinish();
 function runTest()
 {
   window.open("window_focus.xul", "_blank", "chrome,width=600,height=550");
 }
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/dom/workers/test/test_fileReadSlice.xul
+++ b/dom/workers/test/test_fileReadSlice.xul
@@ -20,16 +20,20 @@ https://bugzilla.mozilla.org/show_bug.cg
   </div>
 
   </body>
 
   <!-- test code goes here -->
   <script type="application/javascript">
   <![CDATA[
 
+  if (navigator.platform.indexOf("Win") == 0) {
+    SimpleTest.expectAssertions(0, 1);
+  }
+
   /** Test for Bug 664783 **/
 
   var fileNum = 0;
 
   /**
    * Create a file which contains the given data.
    */
   function createFileWithData(fileData) {
--- a/editor/libeditor/base/tests/test_bug646194.xul
+++ b/editor/libeditor/base/tests/test_bug646194.xul
@@ -18,16 +18,18 @@ https://bugzilla.mozilla.org/show_bug.cg
   <iframe id="i" src="data:text/html,&lt;div contenteditable=true id=t&gt;test me now&lt;/div&gt;"/>
   <p/>
   <pre id="test">
   </pre>
   </body>
   <script class="testbody" type="application/javascript">
   <![CDATA[
 
+SimpleTest.expectAssertions(1);
+
 function runTest() {
   function doCommand(aCmd) {
     var controller = top.document.commandDispatcher
                      .getControllerForCommand(aCmd);
     ok((controller && controller.isCommandEnabled(aCmd)), "command available");
     controller.doCommand(aCmd);
   }
 
--- a/editor/libeditor/html/tests/test_bug537046.html
+++ b/editor/libeditor/html/tests/test_bug537046.html
@@ -18,16 +18,18 @@ https://bugzilla.mozilla.org/show_bug.cg
   </div>
   <div id="source" contenteditable="true">
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 537046 **/
 
+SimpleTest.expectAssertions(1);
+
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
   var ed = document.getElementById("editor");
   var src = document.getElementById("source");
   ed.addEventListener("DOMSubtreeModified", function() {
     src.textContent = ed.innerHTML;
   }, false);
   src.addEventListener("DOMSubtreeModified", function() {
--- a/editor/libeditor/html/tests/test_bug599322.html
+++ b/editor/libeditor/html/tests/test_bug599322.html
@@ -16,16 +16,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="src">src<img src="/tests/editor/libeditor/html/tests/green.png"></div>
 <iframe id="dst" src="javascript:;"></iframe>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 599322.patch **/
 
+SimpleTest.expectAssertions(1);
+
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
   var src = document.getElementById("src");
   var dst = document.getElementById("dst");
   var doc = dst.contentDocument;
   doc.open();
   doc.write("<html><head><base href='http://mochi.test:8888/'></head><body></body></html>");
   doc.close();
--- a/editor/libeditor/html/tests/test_bug674770-1.html
+++ b/editor/libeditor/html/tests/test_bug674770-1.html
@@ -17,16 +17,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a href="file_bug674770-1.html" id="link1">test</a>
 <div contenteditable>
 <a href="file_bug674770-1.html" id="link2">test</a>
 </div>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
+if (navigator.platform.indexOf("Linux") != 0) {
+  SimpleTest.expectAssertions(1);
+}
+
 /** Test for Bug 674770 **/
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(function() {
   SpecialPowers.setBoolPref("middlemouse.paste", true);
   localStorage.removeItem("clicked");
   window.linkWasClicked = false;
 
   var link = document.querySelector("#link1");
--- a/editor/libeditor/text/tests/test_bug638596.html
+++ b/editor/libeditor/text/tests/test_bug638596.html
@@ -13,16 +13,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=638596">Mozilla Bug 638596</a>
 <p id="display"></p>
 <div id="content">
   <input type="password" style="font-size: 0">
 </div>
 <pre id="test">
 <script type="application/javascript">
 
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(1);
+}
+
 /** Test for Bug 638596 **/
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(function() {
   var i = document.querySelector("input");
   i.focus();
   synthesizeKey("t", {});
   synthesizeKey("e", {});
   synthesizeKey("s", {});
--- a/extensions/universalchardet/tests/test_bug426271-utf-8.html
+++ b/extensions/universalchardet/tests/test_bug426271-utf-8.html
@@ -15,16 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=426271">Mozilla Bug 426271</a>
 <p id="display"></p>
 <div id="content" style="display: none">  
 </div>
 <iframe id="testframe"></iframe>
 <pre id="test">
 <script class="testbody" type="text/javascript">
+SimpleTest.expectAssertions(6);
 /** Test for Bug 426271 **/
 CharsetDetectionTests("bug426271_text-utf-8.html",
 		      "UTF-8",
 		      new Array("ja_parallel_state_machine",
 				"zhtw_parallel_state_machine",
 				"zhcn_parallel_state_machine",
 				"zh_parallel_state_machine",
 				"cjk_parallel_state_machine",
--- a/js/xpconnect/tests/chrome/test_bug503926.xul
+++ b/js/xpconnect/tests/chrome/test_bug503926.xul
@@ -16,16 +16,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 
   <iframe id="ifr" type="content" onload="iframe_loaded()" src="bug503926.xul#iframe"/>
   </body>
 
   <!-- test code goes here -->
   <script type="application/javascript">
   <![CDATA[
 
+  SimpleTest.expectAssertions(1);
+
   /** Test for Bug 503926 **/
   function iframe_loaded() {
     var gWindowUtils  = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
                                getInterface(Components.interfaces.nsIDOMWindowUtils);
     var passed = false;
     var obj = { QueryInterface: function() { passed = true; } };
     try { gWindowUtils.dispatchDOMEventViaPresShell(obj, obj, false); } catch (e) {}
     ok(passed, "trusted QIs should be called");
--- a/js/xpconnect/tests/mochitest/test_bug393269.html
+++ b/js/xpconnect/tests/mochitest/test_bug393269.html
@@ -8,16 +8,23 @@ 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=393269">Mozilla Bug 393269</a>
 <iframe id="ifr"></iframe>
 <pre id="test">
 <script class="testbody" type="text/javascript">
+
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(1, 2);
+} else {
+  SimpleTest.expectAssertions(2);
+}
+
 (function () {
     /** Test for Bug 393269 **/
     var doc = $("ifr").contentDocument;
     is("UTF-8", doc.characterSet, "control, getting a property");
     doc.open();
     try {
         is("UTF-8", doc.characterSet,
            "can get a property after 1 document.open")
--- a/layout/base/tests/chrome/test_bug495648.xul
+++ b/layout/base/tests/chrome/test_bug495648.xul
@@ -12,16 +12,18 @@ https://bugzilla.mozilla.org/show_bug.cg
   <body xmlns="http://www.w3.org/1999/xhtml">
   <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=495648"
      target="_blank">Mozilla Bug 495648</a>
   </body>
 
   <!-- test code goes here -->
   <script type="application/javascript">
   <![CDATA[
+  SimpleTest.expectAssertions(18, 24);
+
   /** Test for Bug 495648 **/
   var uri = window.location.href.replace(/test_bug495648.xul/, "bug495648.rdf");
 
   function doTest() {
     var list = document.getElementById('l');
     var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
     var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
     var rdf = rdfService.GetDataSourceBlocking(uri);
--- a/layout/base/tests/chrome/test_printpreview.xul
+++ b/layout/base/tests/chrome/test_printpreview.xul
@@ -5,12 +5,15 @@
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
 <body xmlns="http://www.w3.org/1999/xhtml">
 </body>
   <!-- test code goes here -->
 <script type="application/javascript">
 <![CDATA[
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
 SimpleTest.waitForExplicitFinish();
 window.open("printpreview_helper.xul", "printpreview", "chrome,width=100,height=100");
 ]]></script>
 </window>
--- a/layout/base/tests/chrome/test_printpreview_bug396024.xul
+++ b/layout/base/tests/chrome/test_printpreview_bug396024.xul
@@ -11,12 +11,15 @@ 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=396024"
    target="_blank">Mozilla Bug 396024</a>
 </body>
   <!-- test code goes here -->
 <script type="application/javascript">
 <![CDATA[
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
 SimpleTest.waitForExplicitFinish();
 window.open("printpreview_bug396024_helper.xul", "bug396024", "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
@@ -10,16 +10,19 @@
 <body onload="setTimeout(startTest,0)">
 <div id="t" style="-moz-transform: scale(1.2, 1.2); -moz-transform-origin:top left; width:200px; height:100px; background:yellow; overflow:hidden">
   <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.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(0, 2);
+}
 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;
 const is64 = navigator.platform.indexOf("x86_64") >= 0;
--- a/layout/base/tests/test_bug93077-6.html
+++ b/layout/base/tests/test_bug93077-6.html
@@ -15,16 +15,21 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=93077">Mozilla Bug 93077</a>
 <p id="display"></p>
 <div id=filler>...</div>
 <p id=below></p>
 <p><a name=TOP>Top</a></p>
 <pre id="test">
 <script type="application/javascript">
+
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(0, 2);
+}
+
 /** Test for Bug 93077 **/
 ["#top", "#Top"].forEach(function(fragid) {
   document.getElementById("below").scrollIntoView()
   isnot(window.scrollY, 0)
   location.hash = fragid
   is(window.scrollY, 0)
 })
 location.hash = "#TOP"
--- a/layout/base/tests/test_image_layers.html
+++ b/layout/base/tests/test_image_layers.html
@@ -6,16 +6,20 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <body onload="changeImage()">
 <div>
 <img id="image" src="./image_rgrg-256x256.png" style="-moz-transform: translatex(1px)"></img>
 </div>
 <pre id="test">
 <script type="application/javascript">
+if (navigator.platform.indexOf("Linux") != 0) {
+  SimpleTest.expectAssertions(0, 3);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 var image = document.getElementById("image");
 var lastPaintCount;
 
 function changeImage() {
   lastPaintCount = window.mozPaintCount;
   
--- a/layout/base/tests/test_mozPaintCount.html
+++ b/layout/base/tests/test_mozPaintCount.html
@@ -11,16 +11,20 @@
        drawmode="solid" color="FF00FF00"></embed>
 </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, 2);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 var startPaintCount = window.mozPaintCount;
 ok(true, "Got to initial paint count: " + startPaintCount);
 var color = 0;
 
 function doPluginFlicker() {
   ok(true, "Plugin color iteration " + color + ", paint count: " + window.mozPaintCount);
--- a/layout/base/tests/test_reftests_with_caret.html
+++ b/layout/base/tests/test_reftests_with_caret.html
@@ -9,16 +9,20 @@
   <style>
     iframe {
       width: 600px;
       height: 600px;
     }
   </style>
 <script type="text/javascript">
 
+if (navigator.platform.indexOf("Win") != 0) {
+  SimpleTest.expectAssertions(0, 2);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 var canvases = [];
 function callbackTestCanvas(canvas)
 {
   canvases.push(canvas);
 
   if (canvases.length != 2)
--- a/layout/base/tests/test_scroll_selection_into_view.html
+++ b/layout/base/tests/test_scroll_selection_into_view.html
@@ -62,16 +62,20 @@
     <div style="height:800px;"></div>
   </div>
   <div style="height:800px;"></div>
 </div>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+if (navigator.platform.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 2);
+}
+
 var ANCHOR = 0;
 var FOCUS = 1;
 
 function testCollapsed(id, vPercent, startAt, expected) {
   netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
   var selection = window.getSelection().QueryInterface(Components.interfaces.nsISelectionPrivate);
 
   var c = document.getElementById("c" + id);
--- a/layout/forms/test/test_bug536567_perwindowpb.html
+++ b/layout/forms/test/test_bug536567_perwindowpb.html
@@ -10,16 +10,20 @@ https://bugzilla.mozilla.org/show_bug.cg
   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=536567">Mozilla Bug 536567</a>
 <p id="display"></p>
 <pre id="test">
 <script type="application/javascript">
 
+if (navigator.platform.indexOf("Mac") != 0) {
+  SimpleTest.expectAssertions(0, 4);
+}
+
 /** Test for Bug 536567 **/
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 const Cm = Components.manager;
 
 Cu.import("resource://gre/modules/Services.jsm");
--- a/layout/forms/test/test_bug665540.html
+++ b/layout/forms/test/test_bug665540.html
@@ -13,16 +13,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=665540">Mozilla Bug 665540</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 665540 **/
 
 SimpleTest.waitForExplicitFinish();
 
 var win;
 var select;
 var optiona;
 var eventType = "mouseover";
--- a/layout/generic/test/test_bug394239.html
+++ b/layout/generic/test/test_bug394239.html
@@ -21,16 +21,19 @@ https://bugzilla.mozilla.org/show_bug.cg
   <div style="position: absolute;">
     <span style="position: fixed;">t</span>
   </div>
  </object>
 </div>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=394239">Mozilla Bug 394239</a>
 <pre id="test">
 <script class="testbody" type="text/javascript">
+
+SimpleTest.expectAssertions(1);
+
 /** Test for Bug 394239 **/
 function test()
 {
   $("a").style.direction="rtl";
   ok(true, "Should not crash");
   SimpleTest.finish();
 }
   setTimeout(test, 500);
--- a/layout/generic/test/test_bug469613.xul
+++ b/layout/generic/test/test_bug469613.xul
@@ -19,16 +19,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 </body>
 
 <vbox style="height: 100px; overflow: auto;" id="scrollbox">
   <hbox style="height: 200px;"/>
 </vbox>
 
 <script class="testbody" type="application/javascript;version=1.7"><![CDATA[
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 3);
+}
+
 /** Test for Bug 469613 **/
 
 function doTest() {
   let scrollbox = document.getElementById("scrollbox");
   scrollbox.scrollTop = 0;
 
   // Make sure that the "scroll focus" is inside the scrollbox by moving the
   // mouse in the scrollbox.
--- a/layout/generic/test/test_bug469774.xul
+++ b/layout/generic/test/test_bug469774.xul
@@ -22,16 +22,20 @@ 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;version=1.7"><![CDATA[
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 3);
+}
+
 /** Test for Bug 469774 **/
 
 // Test whether menu popups are blocked from being painted in their parent window.
 
 // Like snapshotWindow, but with DRAWWINDOW_DRAW_CARET
 function snapShot() {
   var canvas = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
   canvas.setAttribute("width", 200);
--- a/layout/generic/test/test_bug508115.xul
+++ b/layout/generic/test/test_bug508115.xul
@@ -15,16 +15,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body  xmlns="http://www.w3.org/1999/xhtml">
   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=508115">Mozilla Bug 508115</a>
 
   <p id="display"></p>
 <div id="content" style="display: none">
 </div>
 </body>
 <script class="testbody" type="application/javascript"><![CDATA[
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 3);
+}
+
 function doTest() {
   document.getElementById("panel").style.display = '';
   document.getElementById("deck").selectedIndex = 1;
   document.getElementById("anchor").open = true;
   document.getElementById("container").style.width = "0";
   document.getElementById("anchor2").open = true;
 }
 var count = 0;
--- a/layout/generic/test/test_bug514732-2.xul
+++ b/layout/generic/test/test_bug514732-2.xul
@@ -25,16 +25,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 </pre>
 </body>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(0, 3);
+}
+
 /** Test for Bug 514732 **/
 
 SimpleTest.waitForExplicitFinish();
 window.open("file_bug514732_window.xul", "bug514732",
             "chrome,width=600,height=600,scrollbars");
 
 ]]>
 </script>
--- a/layout/generic/test/test_bug632379.xul
+++ b/layout/generic/test/test_bug632379.xul
@@ -161,16 +161,20 @@ 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.indexOf("Linux") == 0) {
+  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;
 
 function snapshot(elem)
 {
     pos[count] = elem.getBoundingClientRect().top;
--- a/layout/generic/test/test_selection_underline.html
+++ b/layout/generic/test/test_selection_underline.html
@@ -3,16 +3,22 @@
 <head>
   <title>Test for selection underline</title>
   <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
   <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 
 <script type="text/javascript">
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 3);
+} else if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 // Canvas related code stolen from layout/base/tests/bidi_numeral_test.js which
 // stole from http://developer.mozilla.org/en/docs/Code_snippets:Canvas
 
 var RemoteCanvas = function(aIFrame, aTest) {
   this.iframe = aIFrame;
   this.test = aTest;
   this.snapshot = null;
 };
--- a/layout/mathml/tests/test_bug553917.html
+++ b/layout/mathml/tests/test_bug553917.html
@@ -4,16 +4,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 -->
 <html>
   <head>
     <title>Test for Bug 553917</title>
     <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
     <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     <script type="application/javascript">
+      SimpleTest.expectAssertions(204);
+
       var stringBundleService = 
         SpecialPowers.Cc["@mozilla.org/intl/stringbundle;1"]
                     .getService(SpecialPowers.Ci.nsIStringBundleService);
       var g_bundl =
         stringBundleService.createBundle("chrome://global/locale/mathml/mathml.properties");
       
       var g_errorInfo = {
       /*<math><mroot></mroot></math>
--- a/layout/style/test/test_pointer-events.html
+++ b/layout/style/test/test_pointer-events.html
@@ -45,16 +45,22 @@
     iframe.contentDocument.writeln("<"+"/script>");
     iframe.contentDocument.close();
   </script>
 
 </div>
 <pre id="test">
 <script type="application/javascript;version=1.8">
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+} else {
+  SimpleTest.expectAssertions(1);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 function catches_pointer_events(element_id)
 {
     // we just assume the element is on top here.
     var element = document.getElementById(element_id);
     var bounds = element.getBoundingClientRect();
     var point = { x: bounds.left + bounds.width/2, y: bounds.top + bounds.height/2 };
--- a/layout/style/test/test_value_computation.html
+++ b/layout/style/test/test_value_computation.html
@@ -8,16 +8,17 @@
   <script type="text/javascript" src="property_database.js"></script>
   <style type="text/css" id="stylesheet"></style>
   <style type="text/css">
   /* For 'width', 'height', etc., need a constant size container. */
   #display { width: 500px; height: 200px }
   </style>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <script type="text/javascript">
+  SimpleTest.expectAssertions(7);
   SimpleTest.waitForExplicitFinish();
 
   var load_count = 0;
   function load_done() {
     if (++load_count == 3)
       run_tests();
   }
   </script>
--- a/parser/htmlparser/tests/mochitest/test_bug460437.xhtml
+++ b/parser/htmlparser/tests/mochitest/test_bug460437.xhtml
@@ -12,16 +12,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 <p id="display"><b id="test460437">orig</b></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 <![CDATA[
 
+SimpleTest.expectAssertions(1);
+
 /** Test for Bug 460437 **/
 
 var s = '<i>invalid</i';
 try {
   document.getElementById('test460437').innerHTML = s;
 } catch (e) {
 }
 is(document.getElementById('test460437').innerHTML, "", "setting invalid innerHTML should clear it");
--- a/parser/htmlparser/tests/mochitest/test_bug613662.xhtml
+++ b/parser/htmlparser/tests/mochitest/test_bug613662.xhtml
@@ -7,16 +7,18 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script type="application/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=613662">Mozilla Bug 613662</a>
 <p id="display"></p><div id="content" style="display: none"></div><div id="content2" style="display: none"></div><pre id="test">
 <script type="application/javascript"><![CDATA[
 
+SimpleTest.expectAssertions(1);
+
 /** Test for Bug 613662 **/
 
 function testPositions(node) {
   node.insertAdjacentHTML("beforeBegin", "\u003Cscript>ok(false, 'script should not have run');\u003C/script><i></i>");
   is(node.previousSibling.localName, "i", "Should have had <i> as previous sibling");
   node.insertAdjacentHTML("Afterbegin", "<b></b>\u003Cscript>ok(false, 'script should not have run');\u003C/script>");
   is(node.firstChild.localName, "b", "Should have had <b> as first child");
   node.insertAdjacentHTML("BeforeEnd", "\u003Cscript>ok(false, 'script should not have run');\u003C/script><u></u>");
--- a/security/manager/ssl/tests/mochitest/mixedcontent/test_bug472986.html
+++ b/security/manager/ssl/tests/mochitest/mixedcontent/test_bug472986.html
@@ -7,16 +7,18 @@
   <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);
+
   // 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);
     img1.src = "https://example.com/tests/security/ssl/mixedcontent/moonsurface.jpg";
--- a/security/manager/ssl/tests/mochitest/mixedcontent/test_cssContent2.html
+++ b/security/manager/ssl/tests/mochitest/mixedcontent/test_cssContent2.html
@@ -7,16 +7,20 @@
   <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">
 
+  if (navigator.platform.indexOf("Mac") == 0) {
+    SimpleTest.expectAssertions(0, 1);
+  }
+
   function runTest()
   {
     isSecurityState("secure");
     document.getElementById("para").style.content =
       "url('http://example.com/tests/security/ssl/mixedcontent/moonsurface.jpg')";
 
     waitForSecurityState("broken", function()
     {
--- a/toolkit/components/aboutmemory/tests/test_aboutmemory.xul
+++ b/toolkit/components/aboutmemory/tests/test_aboutmemory.xul
@@ -14,16 +14,18 @@
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml"></body>
 
   <!-- test code goes here -->
   <script type="application/javascript">
   <![CDATA[
   "use strict";
 
+  SimpleTest.expectAssertions(27);
+
   const Cc = Components.classes;
   const Ci = Components.interfaces;
   const Cr = Components.results;
   let mgr = Cc["@mozilla.org/memory-reporter-manager;1"].
             getService(Ci.nsIMemoryReporterManager);
 
   // Remove all the real reporters and multi-reporters;  save them to
   // restore at the end.
--- a/toolkit/components/passwordmgr/test/test_notifications.html
+++ b/toolkit/components/passwordmgr/test/test_notifications.html
@@ -13,16 +13,18 @@ Login Manager test: notifications
 
 <div id="content" style="display: none">
   <iframe id="iframe"></iframe>
 </div>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+SimpleTest.expectAssertions(23);
+
 /** Test for Login Manager: notifications. **/
 
 // Set testpath to the directory where we live. Used to load tests from
 // alternate Mochitest servers (different hostnames, same content).
 var testpath = document.location.pathname + "/../";
 
 var subtests = [
                    "subtst_notifications_1.html", // 1
--- a/toolkit/content/tests/chrome/test_bug437844.xul
+++ b/toolkit/content/tests/chrome/test_bug437844.xul
@@ -34,16 +34,22 @@ https://bugzilla.mozilla.org/show_bug.cg
     </div>
     <pre id="test">
     </pre>
   </body>
 
   <script class="testbody" type="application/javascript">
     <![CDATA[
 
+      if (navigator.platform.indexOf("Linux") == 0) {
+        SimpleTest.expectAssertions(5, 6);
+      } else {
+        SimpleTest.expectAssertions(4);
+      }
+
       /** Test for Bug 437844 and Bug 348233 **/
       SimpleTest.waitForExplicitFinish();
 
       let prefs = Components.classes["@mozilla.org/preferences-service;1"]
                             .getService(Components.interfaces.nsIPrefBranch);
       prefs.setCharPref("intl.uidirection.en-US", "rtl");
 
       let rootDir = getRootDirectory(window.location.href);
--- a/toolkit/content/tests/chrome/test_bug509732.xul
+++ b/toolkit/content/tests/chrome/test_bug509732.xul
@@ -12,16 +12,20 @@
 
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"
         onload="test()"/>
 
   <!-- test code goes here -->
 <script type="application/javascript">
 <![CDATA[
+if (navigator.platform.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 5);
+}
+
 var gNotificationBox;
 
 // Tests that a notification that is added in an hidden box didn't throw the animation
 function test() {
   SimpleTest.waitForExplicitFinish();
   gNotificationBox = document.getElementById("nb");
 
   is(gNotificationBox.allNotifications.length, 0, "There should be no initial notifications");
--- a/toolkit/content/tests/chrome/test_bug557987.xul
+++ b/toolkit/content/tests/chrome/test_bug557987.xul
@@ -17,16 +17,20 @@
   <menulist id="menulist" editable="true" value="Test bug 557987" 
                                           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.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 SimpleTest.waitForFocus(test);
 
 // Tests that mouse events are correctly dispatched to <toolbarbutton type="menu-button"/>
 function test() {
   
   disableNonTestMouseEvents(true);
--- a/toolkit/content/tests/chrome/test_bug562554.xul
+++ b/toolkit/content/tests/chrome/test_bug562554.xul
@@ -21,16 +21,20 @@
   </toolbarbutton>
 
   <!-- 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.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(test);
 
 // Tests that mouse events are correctly dispatched to <toolbarbutton type="menu"/>
 function test() {
   disableNonTestMouseEvents(true);
   nextTest();
 }
--- a/toolkit/content/tests/chrome/test_bug570192.xul
+++ b/toolkit/content/tests/chrome/test_bug570192.xul
@@ -30,16 +30,22 @@ https://bugzilla.mozilla.org/show_bug.cg
     </div>
     <pre id="test">
     </pre>
   </body>
 
   <script type="application/javascript">
     <![CDATA[
 
+    if (navigator.platform.indexOf("Mac") == 0) {
+      SimpleTest.expectAssertions(0, 2);
+    } else if (navigator.platform.indexOf("Linux") == 0) {
+      SimpleTest.expectAssertions(0, 5);
+    }
+
     addLoadEvent(function() {
       try {
         var content = document.getElementById("content");
         content.innerHTML = '<textbox newlines="pasteintact" ' +
           'xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"/>';
         var textbox = content.firstChild;
         ok(textbox, "created the textbox");
         ok(!textbox.editor, "do we have an editor?");
--- a/toolkit/content/tests/chrome/test_bug585946.xul
+++ b/toolkit/content/tests/chrome/test_bug585946.xul
@@ -18,16 +18,20 @@
 
   <!-- test resuls 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.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 2);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 function startTest() {
   var toolbar = $("toolbar");
 
   var splitter = document.createElement("splitter");
   splitter.setAttribute("id", "dynsplitter");
   splitter.setAttribute("skipintoolbarset", "true");
--- a/toolkit/content/tests/chrome/test_bug624329.xul
+++ b/toolkit/content/tests/chrome/test_bug624329.xul
@@ -16,16 +16,20 @@ https://bugzilla.mozilla.org/show_bug.cg
      target="_blank">Mozilla Bug 624329</a>
   </body>
 
   <!-- test code goes here -->
   <script type="application/javascript">
   <![CDATA[
   /** Test for Bug 624329 **/
 
+if (navigator.platform.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 3);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 var win;
 var timeoutID;
 var menu;
 
 function openTestWindow() {
     win = open("bug624329_window.xul", "_blank", "width=300,resizable=yes,chrome");
--- a/toolkit/content/tests/chrome/test_bug792324.xul
+++ b/toolkit/content/tests/chrome/test_bug792324.xul
@@ -33,16 +33,20 @@ https://bugzilla.mozilla.org/show_bug.cg
           accesskey="X"
           oncommand="clicked(event)"
           label="Button in panel 2"
   />
 </panel>
 
 <script class="testbody" type="application/javascript;version=1.7"><![CDATA[
 
+if (navigator.platform.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 3);
+}
+
 /** Test for Bug 792324 **/
 let after_click;
 
 function clicked(event) {
   after_click(event);
 }
 
 function checkAccessKeyOnPanel(panelid, buttonid, cb) {
--- a/toolkit/content/tests/chrome/test_button.xul
+++ b/toolkit/content/tests/chrome/test_button.xul
@@ -23,16 +23,22 @@
 </hbox>
 
   <!-- 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.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(0, 2);
+} else {
+  SimpleTest.expectAssertions(0, 5);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 function test_button()
 {
   synthesizeMouseExpectEvent($("one"), 2, 2, {}, $("one"), "command", "button press");
   $("one").focus();
   synthesizeKeyExpectEvent("VK_SPACE", { }, $("one"), "command", "key press");
   $("two").disabled = true;
--- a/toolkit/content/tests/chrome/test_chromemargin.xul
+++ b/toolkit/content/tests/chrome/test_chromemargin.xul
@@ -12,16 +12,20 @@
 
   <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.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 SimpleTest.waitForExplicitFinish();
 function runTest()
 {
   window.open("window_chromemargin.xul", "_blank", "chrome,width=600,height=600");
 }
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/content/tests/chrome/test_closemenu_attribute.xul
+++ b/toolkit/content/tests/chrome/test_closemenu_attribute.xul
@@ -23,16 +23,22 @@
       </menupopup>
     </menu>
   </menupopup>
 </button>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
+if (navigator.platform.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 3);
+} else if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(0, 5);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 var gExpectedId = "p3";
 var gMode = -1;
 var gModes = ["", "auto", "single", "none"];
 
 function nextTest()
 {
--- a/toolkit/content/tests/chrome/test_colorpicker_popup.xul
+++ b/toolkit/content/tests/chrome/test_colorpicker_popup.xul
@@ -16,16 +16,22 @@
 <colorpicker id="colorpicker-popup" type="button" color="#FF0000" tabindex="1"/>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
 var gTestPhase = -1;
 var gCp = null;
 
+if (navigator.platform.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 4);
+} else if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(0, 5);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 function preventDefault(event) {
   event.preventDefault();
 }
 
 function runTests()
 {
--- a/toolkit/content/tests/chrome/test_contextmenu_list.xul
+++ b/toolkit/content/tests/chrome/test_contextmenu_list.xul
@@ -68,16 +68,22 @@
 <menupopup id="themenu" onpopupshowing="if (gTestId == -1) event.preventDefault()"
                         onpopupshown="checkPopup()" onpopuphidden="setTimeout(nextTest, 0);">
   <menuitem label="Item"/>
 </menupopup>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(0, 5);
+} else {
+  SimpleTest.expectAssertions(0, 7);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 var gTestId = -1;
 var gTestElement = "list";
 var gSelectionStep = 0;
 var gContextMenuFired = false;
 
 function startTest()
--- a/toolkit/content/tests/chrome/test_datepicker.xul
+++ b/toolkit/content/tests/chrome/test_datepicker.xul
@@ -32,16 +32,20 @@
 </div>
 <pre id="test">
 </pre>
 </body>
 
 <script>
 <![CDATA[
 
+if (navigator.platform.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 5);
+}
+
 var mouseScrolled = false;
 
 SimpleTest.waitForExplicitFinish();
 
 function testtag_datepickers()
 {
   var dppopup = document.getElementById("datepicker-popup");
   testtag_datepicker(document.getElementById("datepicker"), "", "datepicker");
--- a/toolkit/content/tests/chrome/test_deck.xul
+++ b/toolkit/content/tests/chrome/test_deck.xul
@@ -22,16 +22,20 @@
 </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.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 4);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 function test_deck()
 {
   var deck = $("deck1");
   ok(deck.selectedIndex === '0', "deck one selectedIndex");
   // this size is the button height, 80, plus the button padding of 1px on each side,
   // plus the deck's 5px top padding and the 12px bottom padding.
--- a/toolkit/content/tests/chrome/test_dialogfocus.xul
+++ b/toolkit/content/tests/chrome/test_dialogfocus.xul
@@ -18,16 +18,22 @@
 </div>
 <pre id="test">
 </pre>
 </body>
 
 <script>
 <![CDATA[
 
+if (navigator.platform.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 4);
+} else {
+  SimpleTest.expectAssertions(0, 5);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 var expected = [ "one", "_extra2", "tab", "one", "tabbutton2", "tabbutton", "two", "textbox-yes", "one" ];
 // non-Mac will always focus the default button if any of the dialog buttons
 // would be focused
 if (navigator.platform.indexOf("Mac") == -1)
   expected[1] = "_accept";
 
--- a/toolkit/content/tests/chrome/test_findbar.xul
+++ b/toolkit/content/tests/chrome/test_findbar.xul
@@ -23,16 +23,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 </pre>
 </body>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
+SimpleTest.expectAssertions(0, 5);
+
 /** Test for Bug 288254 **/
 SimpleTest.waitForExplicitFinish();
 window.open("findbar_window.xul", "findbartest", 
             "chrome,width=600,height=600");
 
 ]]>
 </script>
 
--- a/toolkit/content/tests/chrome/test_findbar_events.xul
+++ b/toolkit/content/tests/chrome/test_findbar_events.xul
@@ -25,16 +25,20 @@ https://bugzilla.mozilla.org/show_bug.cg
     </div>
     <pre id="test">
     </pre>
   </body>
 
   <script class="testbody" type="application/javascript">
     <![CDATA[
 
+      if (navigator.platform.indexOf("Mac") == 0) {
+        SimpleTest.expectAssertions(0, 4);
+      }
+
       /** Test for Bug 793275 **/
       SimpleTest.waitForExplicitFinish();
       window.open("findbar_events_window.xul", "793275test",
                   "chrome,width=600,height=600");
 
     ]]>
   </script>
 
--- a/toolkit/content/tests/chrome/test_focus_anons.xul
+++ b/toolkit/content/tests/chrome/test_focus_anons.xul
@@ -19,16 +19,22 @@
   </menupopup>
 </menulist>
 <textbox id="textbox"/>
 <scale id="scale"/>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 4);
+} else if (navigator.platform.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 2);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 var gBlurs = 0, gFocuses = 0;
 var gExpectedBlur = "";
 var gExpectedFocus = "";
 
 function blurOccurred(event) {
   gBlurs++;
--- a/toolkit/content/tests/chrome/test_hiddenitems.xul
+++ b/toolkit/content/tests/chrome/test_hiddenitems.xul
@@ -33,16 +33,20 @@ 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.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 2);
+}
+
 /** Test for Bug 317422 **/
 SimpleTest.waitForExplicitFinish();
 
 function testListbox(id)
 {
   var listbox = document.getElementById(id);
   listbox.focus();
   is(listbox.getRowCount(), 7, id + ": Returned the wrong number of rows");
--- a/toolkit/content/tests/chrome/test_hiddenpaging.xul
+++ b/toolkit/content/tests/chrome/test_hiddenpaging.xul
@@ -59,16 +59,20 @@ https://bugzilla.mozilla.org/show_bug.cg
     <listitem id="listbox_item13" label="Item 13"/>
     <listitem id="listbox_item14" label="Item 14"/>
     <listitem id="listbox_item15" label="Item 15" hidden="true"/>
   </listbox>
   
   <!-- test code goes here -->
   <script type="application/javascript"><![CDATA[
 
+if (navigator.platform.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 2);
+}
+
 /** Test for Bug 317422 **/
 SimpleTest.waitForExplicitFinish();
 
 function testRichlistbox()
 {
   var id = "richlistbox";
   var listbox = document.getElementById(id);
   listbox.focus();
--- a/toolkit/content/tests/chrome/test_keys.xul
+++ b/toolkit/content/tests/chrome/test_keys.xul
@@ -5,16 +5,19 @@
 <window title="Keys Test"
   onload="setTimeout(runTest, 0);"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
 
 <script>
+if (navigator.platform.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 2);
+}
 SimpleTest.waitForExplicitFinish();
 function runTest()
 {
   window.open("window_keys.xul", "_blank", "chrome,width=200,height=200");
 }
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/content/tests/chrome/test_largemenu.xul
+++ b/toolkit/content/tests/chrome/test_largemenu.xul
@@ -7,16 +7,20 @@
   xmlns:html="http://www.w3.org/1999/xhtml"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <title>Large Menu Tests</title>
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
 
 <script>
+if (navigator.platform.indexOf("Win") != 0) {
+  SimpleTest.expectAssertions(0, 3);
+}
+
 SimpleTest.waitForExplicitFinish();
 function runTest()
 {
   window.open("window_largemenu.xul", "_blank", "chrome,width=200,height=200");
 }
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/content/tests/chrome/test_menu.xul
+++ b/toolkit/content/tests/chrome/test_menu.xul
@@ -22,16 +22,20 @@
         </menu>
       </menupopup>
     </menu>
   </menubar>
 
   <script class="testbody" type="application/javascript">
   <![CDATA[
 
+  if (navigator.platform.indexOf("Mac") == 0) {
+    SimpleTest.expectAssertions(0, 2);
+  }
+
   SimpleTest.waitForExplicitFinish();
 
   function runTests()
   {
     var menu = document.getElementById("nested");
 
     // nsIDOMXULContainerElement::getIndexOfItem();
     var item = document.getElementById("item2");
--- a/toolkit/content/tests/chrome/test_menuchecks.xul
+++ b/toolkit/content/tests/chrome/test_menuchecks.xul
@@ -31,16 +31,20 @@
   </hbox>
 
   <!--
   This test checks that checkbox and radio menu items work properly
   -->
   <script class="testbody" type="application/javascript">
   <![CDATA[
 
+  if (navigator.platform.indexOf("Mac") == 0) {
+    SimpleTest.expectAssertions(0, 2);
+  }
+
   SimpleTest.waitForExplicitFinish();
   var gTestIndex = 0;
 
   // tests to perform
   var tests = [
     {
       testname: "select unchecked checkbox",
       item: "toolbar",
--- a/toolkit/content/tests/chrome/test_menuitem_blink.xul
+++ b/toolkit/content/tests/chrome/test_menuitem_blink.xul
@@ -11,16 +11,20 @@
   <menulist id="menulist">
     <menupopup id="menupopup">
       <menuitem label="Menu Item" id="menuitem"/>
     </menupopup>
   </menulist>
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 2);
+}
+
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(startTest);
 
 function startTest() {
   if (!/Mac/.test(navigator.platform)) {
     ok(true, "Nothing to test on non-Mac.");
     SimpleTest.finish();
     return;
--- a/toolkit/content/tests/chrome/test_menuitem_commands.xul
+++ b/toolkit/content/tests/chrome/test_menuitem_commands.xul
@@ -6,16 +6,20 @@
         onload="runOrOpen()"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
 
 <script>
 <![CDATA[
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(0, 2);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 function checkAttributes(elem, label, accesskey, disabled, hidden, isAfter)
 {
   var is = window.opener.wrappedJSObject.SimpleTest.is;
 
   is(elem.getAttribute("label"), label, elem.id + " label " + (isAfter ? "after" : "before") + " open");
   is(elem.getAttribute("accesskey"), accesskey, elem.id + " accesskey " + (isAfter ? "after" : "before") + " open");
--- a/toolkit/content/tests/chrome/test_menulist_keynav.xul
+++ b/toolkit/content/tests/chrome/test_menulist_keynav.xul
@@ -18,16 +18,20 @@
     <menuitem id="i4" label="Four"/>
   </menupopup>
 </menulist>
 <button id="button2" label="Two"/>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
+if (navigator.platform.indexOf("Linux") != 0) {
+  SimpleTest.expectAssertions(0, 2);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 var gShowPopup = false;
 var gModifiers = 0;
 
 var iswin = (navigator.platform.indexOf("Win") == 0);
 
 function runTests()
--- a/toolkit/content/tests/chrome/test_mousecapture.xul
+++ b/toolkit/content/tests/chrome/test_mousecapture.xul
@@ -6,16 +6,22 @@
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
 
 <script>
 <![CDATA[
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(6);
+} else {
+  SimpleTest.expectAssertions(6, 8);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 var captureRetargetMode = false;
 var cachedMouseDown = null;
 var previousWidth = 0, originalWidth = 0;
 var loadInWindow = false;
 
 function splitterCallback(adjustment)
--- a/toolkit/content/tests/chrome/test_notificationbox.xul
+++ b/toolkit/content/tests/chrome/test_notificationbox.xul
@@ -13,16 +13,22 @@
     <menuitem label="One"/>
   </menupopup>
 
   <!-- 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.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(0, 3);
+} else {
+  SimpleTest.expectAssertions(0, 2);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 var testtag_notificationbox_buttons = [
   {
     label: "Button 1",
     accesskey: "u",
     callback: testtag_notificationbox_buttonpressed,
     popup: "menupopup"
--- a/toolkit/content/tests/chrome/test_panel.xul
+++ b/toolkit/content/tests/chrome/test_panel.xul
@@ -7,16 +7,20 @@
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
 
 <script>
+if (navigator.platform.indexOf("Mac") == 0) {
+  SimpleTest.expectAssertions(0, 2);
+}
+
 SimpleTest.waitForExplicitFinish();
 function runTest()
 {
   window.open("window_panel.xul", "_blank", "chrome,left=200,top=200,width=200,height=200");
 }
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/content/tests/chrome/test_preferences.xul
+++ b/toolkit/content/tests/chrome/test_preferences.xul
@@ -7,16 +7,19 @@
         onload="RunTest();">
   <title>Preferences Window Tests</title>
 
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
 
   <script type="application/javascript">
   <![CDATA[
+    if (navigator.platform.indexOf("Mac") == 0) {
+      SimpleTest.expectAssertions(4);
+    }
     SimpleTest.waitForExplicitFinish();
 
     const kPref = Components.classes["@mozilla.org/preferences-service;1"]
                             .getService(Components.interfaces.nsIPrefBranch);
 
     // preference values, set 1
     const kPrefValueSet1 =
     {
--- a/toolkit/content/tests/widgets/test_mousecapture_area.html
+++ b/toolkit/content/tests/widgets/test_mousecapture_area.html
@@ -47,16 +47,18 @@
 
 
   <div id="otherelement" style="width: 100px; height: 100px;"></div>
 </div>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
+SimpleTest.expectAssertions(1);
+
 SimpleTest.waitForExplicitFinish();
 
 function runTests()
 {
   //XXX We send a useless click to each image to force it to setup its image
   // map, because flushing layout won't do it. Hopefully bug 135040 will make
   // this not suck.
   synthesizeMouse($("image"), 5, 5, { type: "mousedown" });
--- a/toolkit/content/tests/widgets/test_videocontrols.html
+++ b/toolkit/content/tests/widgets/test_videocontrols.html
@@ -12,16 +12,18 @@
 <div id="content">
   <video width="320" height="240" id="video" src="seek_with_sound.ogg" controls mozNoDynamicControls preload="auto"></video>
 </div>
 
 <pre id="test">
 <script type="text/javascript" src="use_large_cache.js"></script>
 <script class="testbody" type="text/javascript">
 
+SimpleTest.expectAssertions(2);
+
 /*
  * Positions of the  UI elements, relative to the upper-left corner of the
  * <video> box.
  */
 const videoWidth = 320;
 const videoHeight = 240;
 const videoDuration = 3.8329999446868896;
 
--- a/toolkit/identity/tests/chrome/test_sandbox.xul
+++ b/toolkit/identity/tests/chrome/test_sandbox.xul
@@ -21,16 +21,18 @@ https://bugzilla.mozilla.org/show_bug.cg
   <!-- test code goes here -->
   <script type="application/javascript;version=1.8">
   <![CDATA[
 
   /** Test for Bug 762993 **/
 
 "use strict";
 
+SimpleTest.expectAssertions(2);
+
 SimpleTest.waitForExplicitFinish();
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 const OSX_10_5 = navigator.oscpu == "Intel Mac OS X 10.5";
 
 const secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager);
--- a/toolkit/mozapps/downloads/tests/chrome/test_bug_412360.xul
+++ b/toolkit/mozapps/downloads/tests/chrome/test_bug_412360.xul
@@ -17,16 +17,20 @@
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
   <script type="application/javascript"
           src="utils.js"/>
 
   <script type="application/javascript">
   <![CDATA[
 
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(1);
+}
+
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 let didFail = false;
 var file;
 
 let prefBranch = Cc["@mozilla.org/preferences-service;1"].
                  getService(Ci.nsIPrefBranch);
 
--- a/toolkit/mozapps/downloads/tests/chrome/test_bug_462172.xul
+++ b/toolkit/mozapps/downloads/tests/chrome/test_bug_462172.xul
@@ -27,16 +27,20 @@ close window
           src="utils.js"/>
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/ChromeUtils.js"></script>
   <script type="application/javascript">
   <![CDATA[
 
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(1);
+}
+
   /** Test for Bug 462172 **/
 var missingFileElid;
 var realFileElid;
 const kFiller = "notApplicable";
 const kFillerURL = "https://bugzilla.mozilla.org/show_bug.cgi?id=462172"
 var realFile = Cc["@mozilla.org/file/directory_service;1"].
                   getService(Ci.nsIProperties).get("CurWorkD", Ci.nsIFile);
 var missingFile = Cc["@mozilla.org/file/directory_service;1"].
--- a/toolkit/mozapps/downloads/tests/chrome/test_cleanup_search.xul
+++ b/toolkit/mozapps/downloads/tests/chrome/test_cleanup_search.xul
@@ -17,16 +17,20 @@
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
   <script type="application/javascript"
           src="utils.js"/>
 
   <script type="application/javascript">
   <![CDATA[
 
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(1);
+}
+
 function test()
 {
   var dmui = getDMUI();
   if (!dmui) {
     todo(false, "skip test for toolkit download manager UI");
     return;
   }
 
--- a/toolkit/mozapps/downloads/tests/chrome/test_close_on_last_window.xul
+++ b/toolkit/mozapps/downloads/tests/chrome/test_close_on_last_window.xul
@@ -18,16 +18,20 @@
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
   <script type="application/javascript"
           src="utils.js"/>
 
   <script type="application/javascript">
   <![CDATA[
 
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(2);
+}
+
 const DLMGR_UI_DONE = "download-manager-ui-done";
 
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 let gGen, dm, dmui, chromeWindow, testCleanup;
 
 function test()
 {
--- a/toolkit/mozapps/downloads/tests/chrome/test_multiword_search.xul
+++ b/toolkit/mozapps/downloads/tests/chrome/test_multiword_search.xul
@@ -15,16 +15,20 @@
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
   <script type="application/javascript"
           src="utils.js"/>
 
   <script type="application/javascript">
   <![CDATA[
 
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(1, 2);
+}
+
 function test()
 {
   var dmui = getDMUI();
   if (!dmui) {
     todo(false, "skip test for toolkit download manager UI");
     return;
   }
 
--- a/toolkit/mozapps/downloads/tests/chrome/test_search_clearlist.xul
+++ b/toolkit/mozapps/downloads/tests/chrome/test_search_clearlist.xul
@@ -14,16 +14,20 @@
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
   <script type="application/javascript"
           src="utils.js"/>
 
   <script type="application/javascript">
   <![CDATA[
 
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(1);
+}
+
 function test()
 {
   var dmui = getDMUI();
   if (!dmui) {
     todo(false, "skip test for toolkit download manager UI");
     return;
   }
 
--- a/toolkit/mozapps/downloads/tests/chrome/test_search_keys.xul
+++ b/toolkit/mozapps/downloads/tests/chrome/test_search_keys.xul
@@ -17,16 +17,20 @@
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
   <script type="application/javascript"
           src="utils.js"/>
 
   <script type="application/javascript">
   <![CDATA[
 
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(1);
+}
+
 function test_meta_k(aWin)
 {
   let doc = aWin.document;
   let searchbox = doc.getElementById("searchbox");
   let richlistbox = doc.getElementById("downloadView");
 
   // Enusre the serachbox is not focused
   richlistbox.focus();
--- a/toolkit/mozapps/downloads/tests/chrome/test_select_all.xul
+++ b/toolkit/mozapps/downloads/tests/chrome/test_select_all.xul
@@ -16,16 +16,20 @@
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
   <script type="application/javascript"
           src="utils.js"/>
 
   <script type="application/javascript">
   <![CDATA[
 
+if (navigator.platform.indexOf("Linux") == 0) {
+  SimpleTest.expectAssertions(1);
+}
+
 function test()
 {
   var dmui = getDMUI();
   if (!dmui) {
     todo(false, "skip test for toolkit download manager UI");
     return;
   }
 
--- a/widget/tests/test_bug538242.xul
+++ b/widget/tests/test_bug538242.xul
@@ -19,16 +19,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 </pre>
 </body>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
+if (navigator.platform.indexOf("Win") == 0) {
+  SimpleTest.expectAssertions(0, 1);
+}
+
 SimpleTest.waitForExplicitFinish();
 
 SimpleTest.waitForFocus(function () {
   if (navigator.platform.indexOf("Lin") != -1) {
     ok(true, "This test is disabled on Linux because it expects moving windows to be synchronous which is not guaranteed on Linux.");
     SimpleTest.finish();
     return;
   }
--- a/widget/tests/test_composition_text_querycontent.xul
+++ b/widget/tests/test_composition_text_querycontent.xul
@@ -14,15 +14,17 @@
 </div>
 <pre id="test">
 </pre>
 </body>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
+SimpleTest.expectAssertions(8);
+
 SimpleTest.waitForExplicitFinish();
 window.open("window_composition_text_querycontent.xul", "_blank", 
             "chrome,width=600,height=600");
 
 ]]>
 </script>
 </window>