Bug 1378227 - Reintroduce window test for Marionette:GetWindowRect; r?whimboo draft
authorAndreas Tolfsen <ato@sny.no>
Sun, 09 Jul 2017 17:15:28 +0100
changeset 606788 4453759a088fde951a74a44205c5e4ce19198c61
parent 606787 b07db5d650b7056c78ba0dbc409d060ec4e922cd
child 636861 bb264093de787c3464b56dcc66c55b247c3f0115
push id67803
push userbmo:ato@sny.no
push dateTue, 11 Jul 2017 12:43:48 +0000
reviewerswhimboo
bugs1378227
milestone56.0a1
Bug 1378227 - Reintroduce window test for Marionette:GetWindowRect; r?whimboo When linting the Marionette server code, https://searchfox.org/mozilla-central/commit/de001d80b777ff0fcfa823a52e8d49b4981af040 accidentally removed the missing window check from the Marionette:GetWindowRect command. This change reintroduces the check that was accidentally removed. MozReview-Commit-ID: FkDOUKR2dIi
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -1309,16 +1309,17 @@ GeckoDriver.prototype.getChromeWindowHan
  *     of browser window.
  *
  * @throws {NoSuchWindowError}
  *     Top-level browsing context has been discarded.
  * @throws {UnexpectedAlertOpenError}
  *     A modal dialog is open, blocking this operation.
  */
 GeckoDriver.prototype.getWindowRect = function(cmd, resp) {
+  assert.window(this.getCurrentWindow());
   assert.noUserPrompt(this.dialog);
   return this.curBrowser.rect;
 };
 
 /**
  * Set the window position and size of the browser on the operating
  * system window manager.
  *