Bug 1280101 - Do not coerce window dimensions to integer; r=automatedtester, a=test-only
authorAndreas Tolfsen <ato@mozilla.com>
Tue, 14 Jun 2016 18:57:02 +0100
changeset 341755 98142136966aac95c83984dc9fd9b8b984fbd571
parent 341754 fb650a44de9ebb79104dd29b9534827398bf40de
child 341756 0ede8b89298041ec3540c0439db8efc571cf5b6a
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester, test-only
bugs1280101
milestone49.0a2
Bug 1280101 - Do not coerce window dimensions to integer; r=automatedtester, a=test-only The specification says nothing about coercing to integer. MozReview-Commit-ID: Cq5Wbo2vIAD
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -2486,18 +2486,18 @@ GeckoDriver.prototype.getWindowSize = fu
  * An error will be returned if the requested window size would result
  * in the window being in the maximized state.
  */
 GeckoDriver.prototype.setWindowSize = function(cmd, resp) {
   if (this.appName != "Firefox") {
     throw new UnsupportedOperationError();
   }
 
-  let width = parseInt(cmd.parameters.width);
-  let height = parseInt(cmd.parameters.height);
+  let width = cmd.parameters.width;
+  let height = cmd.parameters.height;
 
   let win = this.getCurrentWindow();
   if (width >= win.screen.availWidth || height >= win.screen.availHeight) {
     throw new UnsupportedOperationError("Requested size exceeds screen size")
   }
 
   win.resizeTo(width, height);
 };