Skip to content

Commit cedaa07

Browse files
committed
Make the FirefoxDriver XPI throw exception for unknown timeout type.
1 parent 3006b92 commit cedaa07

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

javascript/atoms/error.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ bot.ErrorCode = {
6060
SQL_DATABASE_ERROR: 35,
6161
INVALID_XPATH_SELECTOR: 51,
6262
INVALID_XPATH_SELECTOR_RETURN_TYPE: 52,
63+
INVALID_ARGUMENT: 61,
6364
// The following error codes are derived straight from HTTP return codes.
6465
METHOD_NOT_ALLOWED: 405
6566
};

javascript/firefox-driver/js/firefoxDriver.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,8 @@ FirefoxDriver.prototype.setTimeout = function(respond, parameters) {
857857
break;
858858

859859
default:
860-
break;
860+
throw new WebDriverError(bot.ErrorCode.INVALID_ARGUMENT,
861+
'Unrecognised timeout type: ' + parameters.type);
861862
}
862863
respond.send();
863864
};

0 commit comments

Comments
 (0)