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 : 89c7d99027add7df3b38797b9df041e3e38a4939
This commit is contained in:
Andreas Tolfsen 2016-03-17 14:57:46 +00:00
Родитель 368f4c16af
Коммит 86fe465e04
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();