Open main menu

CDOT Wiki β


Implementing the Mouse Lock API in Firefox

537 bytes added, 11:53, 15 December 2011
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:
&lt;!-- snip --&gt;
&lt;body onload="runTests();"&gt;
&lt;!-- other tags that you may need go here --&gt;
function runTests() {
SimpleTest.waitForFocus(function() {
// Test code goes here
&lt;!-- /snip --&gt;</pre>
====Using the Test Harness====