[dom] Fix DOM XY tests stuff

This change fixes some stuff on DOM XY tests as follows.

1) Both the expected and actual values should be normalized by Math.floor() or
   Math.ceil() functions because the expected values on Chrome 36 (currently
   Beta) returns fractional values [1], the actual values on Firefox 29
   (Stable) returns fractional values.

2) The testXY() function's parameters is opposite. Fix the order of the
   parameters to avoid the confusion.

3) Clean up some unused variables.

[1]: http://blog.chromium.org/2014/05/chrome-36-beta-elementanimate-html.html
Merge branch 'fix-dom-xy-test' into dev-master
Merge branch 'dev-master' into dev-3.x