Open main menu

CDOT Wiki β


Implementing the Mouse Lock API in Firefox

379 bytes removed, 11:53, 15 December 2011
Reviewing Tests
# Prefer <code>i++;</code> to <code>i+=1;</code>
# Many tests require the harness and focus, ensure that those tests are correctly written ie:
#* For Harness: See [[#Using the Test Harness|here]]#* For Focus: Ensure the test resembles the following format-<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>See [[#Waiting For Focus]]
One or more tests have to deal with switching the lock between multiple elements, and the [[Changes to Fullscreen Unlock|spec is changing]] on that front.