Bug 1103196 - Add insecure certificate error; r=automatedtester draft
authorAndreas Tolfsen <ato@mozilla.com>
Sun, 06 Nov 2016 18:00:18 +0000
changeset 444161 9461eeec344459d7be67aebc21ad3bca0c31e008
parent 444160 f05a99f3f3cf50698fd7854a759171b98e9562fe
child 444162 f1adbcdf6e443fdf2beb2a2165fbfc6152477312
push id37208
push userbmo:ato@mozilla.com
push dateSat, 26 Nov 2016 15:03:07 +0000
reviewersautomatedtester
bugs1103196
milestone53.0a1
Bug 1103196 - Add insecure certificate error; r=automatedtester MozReview-Commit-ID: 26wwOuqWhog
testing/marionette/client/marionette_driver/errors.py
testing/marionette/error.js
--- a/testing/marionette/client/marionette_driver/errors.py
+++ b/testing/marionette/client/marionette_driver/errors.py
@@ -50,16 +50,20 @@ class MarionetteException(Exception):
 
         return msg
 
 
 class ElementNotSelectableException(MarionetteException):
     status = "element not selectable"
 
 
+class InsecureCertificateException(MarionetteException):
+    status = "insecure certificate"
+
+
 class InvalidArgumentException(MarionetteException):
     status = "invalid argument"
 
 
 class InvalidSessionIdException(MarionetteException):
     status = "invalid session id"
 
 
--- a/testing/marionette/error.js
+++ b/testing/marionette/error.js
@@ -4,16 +4,17 @@
 
 "use strict";
 
 const {interfaces: Ci, utils: Cu} = Components;
 
 const ERRORS = new Set([
   "ElementNotAccessibleError",
   "ElementNotVisibleError",
+  "InsecureCertificateError",
   "InvalidArgumentError",
   "InvalidElementStateError",
   "InvalidSelectorError",
   "InvalidSessionIdError",
   "JavaScriptError",
   "NoAlertOpenError",
   "NoSuchElementError",
   "NoSuchFrameError",
@@ -224,16 +225,23 @@ ElementNotAccessibleError.prototype = Ob
 
 this.ElementNotVisibleError = function(msg) {
   WebDriverError.call(this, msg);
   this.name = "ElementNotVisibleError";
   this.status = "element not visible";
 };
 ElementNotVisibleError.prototype = Object.create(WebDriverError.prototype);
 
+this.InsecureCertificateError = function(msg) {
+  WebDriverError.call(this, msg);
+  this.name = "InsecureCertificateError";
+  this.status = "insecure certificate";
+};
+InsecureCertificateError.prototype = Object.create(WebDriverError.prototype);
+
 this.InvalidArgumentError = function(msg) {
   WebDriverError.call(this, msg);
   this.name = "InvalidArgumentError";
   this.status = "invalid argument";
 };
 InvalidArgumentError.prototype = Object.create(WebDriverError.prototype);
 
 this.InvalidElementStateError = function(msg) {