Bug 1282833 - Correct error on unsupported Set Window Position; r?automatedtester draft
authorAndreas Tolfsen <ato@mozilla.com>
Thu, 06 Oct 2016 13:09:10 +0100
changeset 421549 16963c64de5f11af3e3e82aa1a13236d2b672867
parent 421441 c7d62e6d052c5d2638b08d480a720254ea09ff2d
child 421550 b65660a10f3c2ed34ebecbd17ba68146d2ce5962
push id31547
push userbmo:ato@mozilla.com
push dateThu, 06 Oct 2016 12:27:41 +0000
reviewersautomatedtester
bugs1282833
milestone52.0a1
Bug 1282833 - Correct error on unsupported Set Window Position; r?automatedtester MozReview-Commit-ID: 81q7deqyXDS
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -1245,17 +1245,17 @@ GeckoDriver.prototype.getWindowPosition 
  *     X coordinate of the top/left of the window that it will be
  *     moved to.
  * @param {number} y
  *     Y coordinate of the top/left of the window that it will be
  *     moved to.
  */
 GeckoDriver.prototype.setWindowPosition = function(cmd, resp) {
   if (this.appName != "Firefox") {
-    throw new WebDriverError("Unable to set the window position on mobile");
+    throw new UnsupportedOperationError("Unable to set the window position on mobile");
   }
 
   let x = parseInt(cmd.parameters.x);
   let y  = parseInt(cmd.parameters.y);
   if (isNaN(x) || isNaN(y)) {
     throw new UnknownError("x and y arguments should be integers");
   }