Bug 671976: Tweak timing in the hopes of forcing the assertion to stay before TEST-END on Linux32; add additional leakage of expected assertions for Windows.
authorL. David Baron <dbaron@dbaron.org>
Fri, 01 Mar 2013 19:40:43 -0800
changeset 123534 da718adb662124c821c88ca08a3d9dc3fb0bbbef
parent 123533 ee20a1ffe205c9168215ba058d387734a6246cfb
child 123535 93b2766c6f256ca0b2088fa9364b67794ba27784
push id23899
push userdbaron@mozilla.com
push dateSat, 02 Mar 2013 03:40:53 +0000
treeherdermozilla-inbound@da718adb6621 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs671976
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 671976: Tweak timing in the hopes of forcing the assertion to stay before TEST-END on Linux32; add additional leakage of expected assertions for Windows.
layout/base/tests/chrome/test_printpreview.xul
layout/base/tests/chrome/test_printpreview_bug396024.xul
layout/base/tests/chrome/test_printpreview_bug482976.xul
layout/forms/test/test_bug536567_perwindowpb.html
--- a/layout/base/tests/chrome/test_printpreview.xul
+++ b/layout/base/tests/chrome/test_printpreview.xul
@@ -14,23 +14,25 @@ if (navigator.platform.startsWith("Linux
   SimpleTest.expectAssertions(1); // bug 671976
 } else if (navigator.platform.startsWith("Win")) {
   // reliable 1 on Win7, but not on XP
   SimpleTest.expectAssertions(0, 1); // bug 671976
 }
 
 function parentFinish() {
   // This is called while the helper window is still open.  Call
-  // doFinish after it closes.
-  setTimeout(doFinish, 0);
+  // doGC after it closes.
+  setTimeout(doGC, 0);
 }
-function doFinish() {
+function doGC() {
   // Garbage collecting the windows created in this test can cause
   // assertions, so GC now to blame those assertions to this test.
   // ("Destroying a currently-showing document", bug 671976)
   SpecialPowers.gc();
-
+  setTimeout(doFinish, 0);
+}
+function doFinish() {
   SimpleTest.finish();
 }
 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
@@ -20,23 +20,25 @@ if (navigator.platform.startsWith("Linux
   SimpleTest.expectAssertions(2); // bug 671976
 } else if (navigator.platform.startsWith("Win")) {
   // reliable 2 on Win7, but not on XP
   SimpleTest.expectAssertions(0, 2); // bug 671976
 }
 
 function parentFinish() {
   // This is called while the helper window is still open.  Call
-  // doFinish after it closes.
-  setTimeout(doFinish, 0);
+  // doGC after it closes.
+  setTimeout(doGC, 0);
 }
-function doFinish() {
+function doGC() {
   // Garbage collecting the windows created in this test can cause
   // assertions, so GC now to blame those assertions to this test.
   // ("Destroying a currently-showing document", bug 671976)
   SpecialPowers.gc();
-
+  setTimeout(doFinish, 0);
+}
+function doFinish() {
   SimpleTest.finish();
 }
 SimpleTest.waitForExplicitFinish();
 window.open("printpreview_bug396024_helper.xul", "bug396024", "chrome,width=100,height=100");
 ]]></script>
 </window>
--- a/layout/base/tests/chrome/test_printpreview_bug482976.xul
+++ b/layout/base/tests/chrome/test_printpreview_bug482976.xul
@@ -21,22 +21,24 @@ if (navigator.platform.startsWith("Linux
 } else if (navigator.platform.startsWith("Win")) {
   // reliable 1 on Win7, but not on XP
   SimpleTest.expectAssertions(0, 1); // bug 671976
 }
 
 SimpleTest.waitForExplicitFinish();
 function parentFinish() {
   // This is called while the helper window is still open.  Call
-  // doFinish after it closes.
-  setTimeout(doFinish, 0);
+  // doGC after it closes.
+  setTimeout(doGC, 0);
 }
-function doFinish() {
+function doGC() {
   // Garbage collecting the windows created in this test can cause
   // assertions, so GC now to blame those assertions to this test.
   // ("Destroying a currently-showing document", bug 671976)
   SpecialPowers.gc();
-
+  setTimeout(doFinish, 0);
+}
+function doFinish() {
   SimpleTest.finish();
 }
 window.open("printpreview_bug482976_helper.xul", "bug482976", "chrome,width=100,height=100");
 ]]></script>
 </window>
--- 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.startsWith("Win")) {
+  SimpleTest.expectAssertions(0, 1); // bug 671976 assertions leak to this test on Windows
+}
+
 /** 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");