Bug 945734 - Correct argument error in GeckoDriver#setScreenOrientation; r?automatedtester
MozReview-Commit-ID: 4G2GyeFJBJP
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -2403,17 +2403,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}`);
}
};