Bug 1319237 - Assign GeckoDriver#getWindowSize return value in one statement; r=automatedtester
MozReview-Commit-ID: BGH1WkgH91p
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -2400,18 +2400,20 @@ GeckoDriver.prototype.setScreenOrientati
* Get the size of the browser window currently in focus.
*
* Will return the current browser window size in pixels. Refers to
* window outerWidth and outerHeight values, which include scroll bars,
* title bars, etc.
*/
GeckoDriver.prototype.getWindowSize = function (cmd, resp) {
let win = this.getCurrentWindow();
- resp.body.width = win.outerWidth;
- resp.body.height = win.outerHeight;
+ return {
+ width: win.outerWidth,
+ height: win.outerHeight,
+ };
};
/**
* Set the size of the browser window currently in focus.
*
* Not supported on B2G. The supplied width and height values refer to
* the window outerWidth and outerHeight values, which include scroll
* bars, title bars, etc.