Bug 1257526 - Harmonise unsupported operation error usage; r=automatedtester

Throw unsupported operation errors the same way throughout Marionette.

MozReview-Commit-ID: D63gVIeX2qK

--HG--
extra : rebase_source : 2f93a7a847c599234a1303a27a59a64f74e8f3f6
This commit is contained in:
Andreas Tolfsen 2016-03-17 14:57:46 +00:00
Родитель 49e853427a
Коммит 1df002e8b0
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -2647,8 +2647,8 @@ GeckoDriver.prototype.getWindowSize = function(cmd, resp) {
* in the window being in the maximized state.
*/
GeckoDriver.prototype.setWindowSize = function(cmd, resp) {
if (this.appName !== "Firefox") {
throw new UnsupportedOperationError("Not supported on mobile");
if (this.appName != "Firefox") {
throw new UnsupportedOperationError();
}
let width = parseInt(cmd.parameters.width);
@ -2670,7 +2670,7 @@ GeckoDriver.prototype.setWindowSize = function(cmd, resp) {
*/
GeckoDriver.prototype.maximizeWindow = function(cmd, resp) {
if (this.appName != "Firefox") {
throw new UnsupportedOperationError("Not supported for mobile");
throw new UnsupportedOperationError();
}
let win = this.getCurrentWindow();