Changes

From CDOT Wiki
Jump to: navigation, search

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:
<pre>
&lt;!-- snip --&gt;
&lt;body onload="runTests();"&gt;
 
&lt;!-- other tags that you may need go here --&gt;
 
&lt;script&gt;
function runTests() {
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(function() {
 
// Test code goes here
 
});
}
&lt;/script&gt;
&lt;/body&gt;
&lt;!-- /snip --&gt;</pre>
 
 
====Using the Test Harness====

Navigation menu