moussa1

Just another WordPress.com site

mouselock test #27 completed!

Compiling the code after having it done the first time wasn’t as bad– it only took about 20 minutes to compile as opposed to 3 hours when you try to compile it on a fresh reboot.

Humph mentioned that mouselock test #27 was not possible to do in the mochitest framework which kinda boggled my mind because I had no clue how else to attempt in starting it.

So, finally after spending sleepless nights in the past week figuring this out, I was able to complete the mouselock Test #27 (the way I understood it of course). The test passed but I am still not quite sure if I am doing it the right
way.

I was able moving the mouse cursor outside the browser boundaries using synthesizeMouse method and explicitly lost focus of the browser by using window.blur() and refocussing the browser by using window.focus(). I implemented an onBlur
event as well to keep track of the mouse movement X & Y. After setting the focus back to the user agent (firefox), movementXY were both set to 0 successfully.

I committed my changes to the mouselock-tests branch under my mozilla-central repo. I then requested a pull from rhung to the commit I made which pertained to my test.
https://github.com/moussa1/mozilla-central/commit/1c4f4dbc6188e725ad419f75e055f06bf605b9cd

I guess I will have to wait for some feedback to see if the way I had done the test was good enough to satisfy the given scenario.

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: