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 335474 9df0ea5a8f8f9bd4ec35ae4f30afe45ce6b0c396
parent 335473 f63502a8a7ead318b4ba35a413cce395de1da79a
child 335475 85ccaed0061c96468658c35137c86467166624d5
push id1146
push userCallek@gmail.com
push dateMon, 25 Jul 2016 16:35:44 +0000
treeherdermozilla-release@a55778f9cd5a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester, test-only
bugs1280101
milestone48.0
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
@@ -2489,18 +2489,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);
 };