Running FullScreen on Mochitest

08 Dec

After finishing the test for my bug, our professor plugged all the test together and he crashed almost all the test in the mouselock directory (not surprising to me).

So, for the last two days, I was struggling to get my MouseLock test working along with other test cases with Mochitest. In my earlier post, I mentioned how I managed to get the test running using Mochitest when I am running a stand-alone file. But the problem that I am facing now is that the test must run along with other file in test suite. It seem that the enable full screen through an iframe will cause the test to time out without running any test.

To summarize this blog, “I GOT IT WORKING!!”. Now, let me describe how I went about doing it. 😀

When running all the test in a directory using mochitest, the test suite plugs them inside an iFrame (which is html frame tag), which holds each test files and executes them. iFrame does not support the full screen capability as such:

After some digging around, I found this Mozilla Developer Network document that explains that iFrames does not support the full screen as a standard feature.

However, with a lot of digging around I found that there was some other test that was done to solve this little obstacle with regard to full screen and took his code example (full credit to whoever coded those functions).

I had uploaded my code on github and note that this code is poorly formatted (worked on this late at night) and may be improved over time:

Github: (look for the test_DOMtree.html and file_DOMtree.html file) [EDIT: look for the test_FullScreenHarness.html, moouselock_util.js and file_DOMtree.html]

The screenshot below shows my test working….YEEEE!!!! (sorry for “my test”, suck at MS Paint)

Leave a comment

Posted by on December 8, 2011 in Firefox, MouseLock, Open Source


Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: