Use onload instead of setTimeout to reduce random test failures. Bug 482455, r=bz

This commit is contained in:
Simon Montagu 2009-03-10 14:07:33 -07:00
parent c10fc652b0
commit 3b7577c2d5
4 changed files with 7 additions and 10 deletions

View File

@ -10,14 +10,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=445886
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<body onload="Inject()">
<pre id="test">
<script class="testbody" type="text/javascript">
/** Test that unicode non-characters are not discarded **/
function test()
{
ok($("display").innerHTML == "All good.", "Noncharacters not stripped");
is($("display").innerHTML,"All good.", "Noncharacters not stripped");
SimpleTest.finish();
}
@ -291,7 +291,6 @@ function Inject()
test();
}
setTimeout(Inject, 100);
SimpleTest.waitForExplicitFinish();
</script>
</pre>

View File

@ -11,13 +11,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=445886
<link rel="stylesheet" type="text/css"
href="/tests/SimpleTest/test.css">
</head>
<body>
<body onload="Inject()">
<pre id="test"><script class="testbody" type="text/javascript">
/** Test that unicode non-characters are not discarded **/
function test()
{
ok($("display").innerHTML == "All good.", "Noncharacters not stripped");
is($("display").innerHTML, "All good.", "Noncharacters not stripped");
SimpleTest.finish();
}
@ -291,7 +291,6 @@ function Inject()
test();
}
setTimeout(Inject, 100);
SimpleTest.waitForExplicitFinish();
</script>
</pre>

View File

@ -10,14 +10,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=445886
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<body onload="Inject()">
<pre id="test">
<script class="testbody" type="text/javascript">
/** Test that unicode non-characters are not discarded **/
function test()
{
ok($("display").innerHTML == "All good.", "Noncharacters not stripped");
is($("display").innerHTML, "All good.", "Noncharacters not stripped");
SimpleTest.finish();
}
@ -291,7 +291,6 @@ function Inject()
test();
}
setTimeout(Inject, 100);
SimpleTest.waitForExplicitFinish();
</script>
</pre>

View File

@ -23,7 +23,7 @@ function Inject()
/** test that UTF-8 decoding resynchronizes after incomplete sequences */
function test()
{
ok($("display").innerHTML == "All good.", "No overconsumption");
is($("display").innerHTML, "All good.", "No overconsumption");
SimpleTest.finish();
}