Bug 945734 - Correct argument error in GeckoDriver#setScreenOrientation; r=automatedtester a=test-only
authorAndreas Tolfsen <ato@mozilla.com>
Tue, 10 May 2016 14:31:04 +0100
changeset 335228 0515fd909bc87d4c9e962da6278eb7b7bf6d93e9
parent 335227 03b9abd4280fa0f3ff31e5e2c3ab7fe57f8af464
child 335229 18e0dc8fa500281dc7fb9864b2954190b356a5de
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
bugs945734
milestone48.0a2
Bug 945734 - Correct argument error in GeckoDriver#setScreenOrientation; r=automatedtester a=test-only MozReview-Commit-ID: 4G2GyeFJBJP
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -2404,17 +2404,17 @@ GeckoDriver.prototype.setScreenOrientati
     "portrait", "landscape",
     "portrait-primary", "landscape-primary",
     "portrait-secondary", "landscape-secondary"
   ];
 
   let or = String(cmd.parameters.orientation);
   let mozOr = or.toLowerCase();
   if (ors.indexOf(mozOr) < 0) {
-    throw new WebDriverError(`Unknown screen orientation: ${or}`);
+    throw new InvalidArgumentError(`Unknown screen orientation: ${or}`);
   }
 
   let win = this.getCurrentWindow();
   if (!win.screen.mozLockOrientation(mozOr)) {
     throw new WebDriverError(`Unable to set screen orientation: ${or}`);
   }
 };