1
edit
Changes
→Using the Test Harness
# <s>test_syntheticMouseEvent.html</s>
# <s>test_userPref.html</s> - mjschranz
====Waiting For Focus====
Many tests will intermittently hang if they don't wait for focus. To have a test wait for focus, ensure that the test incorporates the following template:
<pre>
<!-- snip -->
<body onload="runTests();">
<!-- other tags that you may need go here -->
<script>
function runTests() {
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(function() {
// Test code goes here
});
}
</script>
</body>
<!-- /snip --></pre>
====Using the Test Harness====