зеркало из https://github.com/mozilla/gecko-dev.git
Bug 404077: Do GC in a small number of tests to reduce the spread of GC-related assertions. r=Jesse
This commit is contained in:
Родитель
3a4659ca6b
Коммит
ba9cc96a51
|
@ -573,6 +573,13 @@ function testExpandos() {
|
|||
m2 = null;
|
||||
if (SpecialPowers) {
|
||||
// Run GC several times to see if the expando property disappears.
|
||||
|
||||
// Also, garbage collecting the windows created in this test can
|
||||
// cause assertions, so we must GC now to blame those assertions to
|
||||
// this test.
|
||||
// ("mArguments wasn't cleaned up properly!" in ~nsGlobalWindow,
|
||||
// bug 600703)
|
||||
|
||||
SpecialPowers.gc();
|
||||
SpecialPowers.gc();
|
||||
SpecialPowers.gc();
|
||||
|
|
|
@ -24,6 +24,12 @@ 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");
|
||||
|
||||
// Garbage collecting the windows created in this test can cause
|
||||
// assertions, so GC now to blame those assertions to this test.
|
||||
// ("mArguments wasn't cleaned up properly!" in ~nsGlobalWindow,
|
||||
// bug 600703)
|
||||
SpecialPowers.gc();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -35,6 +35,13 @@ function closeTest() {
|
|||
|
||||
function finish() {
|
||||
ok(!secondListenerDidRun, "Shouldn't have run second listener!");
|
||||
|
||||
// Garbage collecting the windows created in this test can cause
|
||||
// assertions, so GC now to blame those assertions to this test.
|
||||
// ("mArguments wasn't cleaned up properly!" in ~nsGlobalWindow,
|
||||
// bug 600703)
|
||||
SpecialPowers.gc();
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,13 @@ SimpleTest.waitForExplicitFinish();
|
|||
function runTest() {
|
||||
window.showModalDialog("file_bug406375.html");
|
||||
ok(true, "This test should not hang");
|
||||
|
||||
// Garbage collecting the windows created in this test can cause
|
||||
// assertions, so GC now to blame those assertions to this test.
|
||||
// ("mArguments wasn't cleaned up properly!" in ~nsGlobalWindow,
|
||||
// bug 600703)
|
||||
SpecialPowers.gc();
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,12 @@ is(result2, 0, "window either opened as modal or data loaded synchronously.");
|
|||
result3 = window.showModalDialog("data:text/html,<html><body onload='close(); returnValue = 3;'>");
|
||||
is(result3, 3, "window didn't open as modal.");
|
||||
|
||||
// Garbage collecting the windows created in this test can cause
|
||||
// assertions, so GC now to blame those assertions to this test.
|
||||
// ("mArguments wasn't cleaned up properly!" in ~nsGlobalWindow,
|
||||
// bug 600703)
|
||||
SpecialPowers.gc();
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
|
|
|
@ -58,6 +58,12 @@ if (navigator.platform.indexOf("Win") != 0) {
|
|||
test(false, true, testOtherExceptionsNotTrapped,
|
||||
"Incorrectly suppressed insecure showModalDialog exception.");
|
||||
|
||||
// Garbage collecting the windows created in this test can cause
|
||||
// assertions, so GC now to blame those assertions to this test.
|
||||
// ("mArguments wasn't cleaned up properly!" in ~nsGlobalWindow,
|
||||
// bug 600703)
|
||||
SpecialPowers.gc();
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -32,6 +32,13 @@ function runTest() {
|
|||
result = window.showModalDialog("http://test1.example.com/tests/dom/tests/mochitest/bugs/file_bug504862.html", "my args");
|
||||
|
||||
is(result, null, "Able to see return value from cross origin dialog.");
|
||||
|
||||
// Garbage collecting the windows created in this test can cause
|
||||
// assertions, so GC now to blame those assertions to this test.
|
||||
// ("mArguments wasn't cleaned up properly!" in ~nsGlobalWindow,
|
||||
// bug 600703)
|
||||
SpecialPowers.gc();
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче