mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 330f6df11b2f (bug 1154691)
This commit is contained in:
parent
0c49417b2c
commit
13be452edd
@ -11,11 +11,11 @@ import time
|
||||
import types
|
||||
import weakref
|
||||
|
||||
from b2ginstance import B2GInstance
|
||||
from marionette_driver.errors import InvalidResponseException
|
||||
from marionette_driver.marionette import Marionette
|
||||
from marionette_test import MarionetteTestCase
|
||||
from marionette_transport import MarionetteTransport
|
||||
|
||||
from b2ginstance import B2GInstance
|
||||
from runtests import MarionetteTestRunner, cli
|
||||
|
||||
class B2GUpdateMarionetteClient(MarionetteTransport):
|
||||
@ -237,10 +237,16 @@ class B2GUpdateTestCase(MarionetteTestCase):
|
||||
|
||||
self.print_status(status, os.path.basename(path))
|
||||
|
||||
results = self.marionette.execute_async_script(data,
|
||||
script_args=[self.testvars],
|
||||
special_powers=True)
|
||||
self.handle_results(path, stage, results)
|
||||
try:
|
||||
results = self.marionette.execute_async_script(data,
|
||||
script_args=[self.testvars],
|
||||
special_powers=True)
|
||||
self.handle_results(path, stage, results)
|
||||
except InvalidResponseException, e:
|
||||
# If the update test causes a restart, we will get an invalid
|
||||
# response from the socket here.
|
||||
if not will_restart:
|
||||
raise e
|
||||
|
||||
def handle_results(self, path, stage, results):
|
||||
passed = results['passed']
|
||||
|
@ -16,8 +16,8 @@ import warnings
|
||||
|
||||
|
||||
from marionette_driver.errors import (
|
||||
MarionetteException, TimeoutException,
|
||||
JavascriptException, NoSuchElementException, NoSuchWindowException,
|
||||
MarionetteException, InstallGeckoError, TimeoutException, InvalidResponseException,
|
||||
JavascriptException, NoSuchElementException, XPathLookupException, NoSuchWindowException,
|
||||
StaleElementException, ScriptTimeoutException, ElementNotVisibleException,
|
||||
NoSuchFrameException, InvalidElementStateException, NoAlertPresentException,
|
||||
InvalidCookieDomainException, UnableToSetCookieException, InvalidSelectorException,
|
||||
|
@ -49,16 +49,8 @@ class MarionetteException(Exception):
|
||||
return "".join(traceback.format_exception(self.__class__, msg, tb))
|
||||
|
||||
|
||||
class ElementNotSelectableException(MarionetteException):
|
||||
status = "element not selectable"
|
||||
|
||||
|
||||
class InvalidArgumentException(MarionetteException):
|
||||
status = "invalid argument"
|
||||
|
||||
|
||||
class InvalidSessionIdException(MarionetteException):
|
||||
status = "invalid session id"
|
||||
class InstallGeckoError(MarionetteException):
|
||||
pass
|
||||
|
||||
|
||||
class TimeoutException(MarionetteException):
|
||||
@ -66,6 +58,11 @@ class TimeoutException(MarionetteException):
|
||||
status = "timeout"
|
||||
|
||||
|
||||
class InvalidResponseException(MarionetteException):
|
||||
code = (53,)
|
||||
status = "invalid response"
|
||||
|
||||
|
||||
class JavascriptException(MarionetteException):
|
||||
code = (17,)
|
||||
status = "javascript error"
|
||||
@ -76,6 +73,11 @@ class NoSuchElementException(MarionetteException):
|
||||
status = "no such element"
|
||||
|
||||
|
||||
class XPathLookupException(MarionetteException):
|
||||
code = (19,)
|
||||
status = "invalid xpath selector"
|
||||
|
||||
|
||||
class NoSuchWindowException(MarionetteException):
|
||||
code = (23,)
|
||||
status = "no such window"
|
||||
@ -157,6 +159,11 @@ class FrameSendFailureError(MarionetteException):
|
||||
status = "frame send failure"
|
||||
|
||||
|
||||
class UnsupportedOperationException(MarionetteException):
|
||||
code = (405,)
|
||||
status = "unsupported operation"
|
||||
|
||||
|
||||
class SessionNotCreatedException(MarionetteException):
|
||||
code = (33, 71)
|
||||
status = "session not created"
|
||||
@ -166,50 +173,31 @@ class UnexpectedAlertOpen(MarionetteException):
|
||||
code = (26,)
|
||||
status = "unexpected alert open"
|
||||
|
||||
|
||||
class UnknownCommandException(MarionetteException):
|
||||
code = (9,)
|
||||
status = "unknown command"
|
||||
|
||||
|
||||
class UnknownException(MarionetteException):
|
||||
code = (13,)
|
||||
status = "unknown error"
|
||||
|
||||
|
||||
class UnsupportedOperationException(MarionetteException):
|
||||
code = (405,)
|
||||
status = "unsupported operation"
|
||||
|
||||
|
||||
excs = [
|
||||
ElementNotAccessibleException,
|
||||
ElementNotSelectableException,
|
||||
ElementNotVisibleException,
|
||||
FrameSendFailureError,
|
||||
FrameSendNotInitializedError,
|
||||
InvalidArgumentException,
|
||||
InvalidCookieDomainException,
|
||||
InvalidElementCoordinates,
|
||||
InvalidElementStateException,
|
||||
InvalidSelectorException,
|
||||
InvalidSessionIdException,
|
||||
JavascriptException,
|
||||
MarionetteException,
|
||||
MoveTargetOutOfBoundsException,
|
||||
NoAlertPresentException,
|
||||
NoSuchElementException,
|
||||
NoSuchFrameException,
|
||||
NoSuchWindowException,
|
||||
ScriptTimeoutException,
|
||||
SessionNotCreatedException,
|
||||
StaleElementException,
|
||||
TimeoutException,
|
||||
InvalidResponseException,
|
||||
JavascriptException,
|
||||
NoSuchElementException,
|
||||
XPathLookupException,
|
||||
NoSuchWindowException,
|
||||
StaleElementException,
|
||||
ScriptTimeoutException,
|
||||
ElementNotVisibleException,
|
||||
ElementNotAccessibleException,
|
||||
NoSuchFrameException,
|
||||
InvalidElementStateException,
|
||||
NoAlertPresentException,
|
||||
InvalidCookieDomainException,
|
||||
UnableToSetCookieException,
|
||||
UnexpectedAlertOpen,
|
||||
UnknownCommandException,
|
||||
UnknownException,
|
||||
InvalidElementCoordinates,
|
||||
InvalidSelectorException,
|
||||
MoveTargetOutOfBoundsException,
|
||||
FrameSendNotInitializedError,
|
||||
FrameSendFailureError,
|
||||
UnsupportedOperationException,
|
||||
SessionNotCreatedException,
|
||||
UnexpectedAlertOpen,
|
||||
]
|
||||
|
||||
|
||||
|
@ -14,7 +14,6 @@ const errors = [
|
||||
"IllegalArgumentError",
|
||||
"InvalidElementStateError",
|
||||
"InvalidSelectorError",
|
||||
"InvalidSessionIdError",
|
||||
"JavaScriptError",
|
||||
"NoAlertOpenError",
|
||||
"NoSuchElementError",
|
||||
@ -212,14 +211,6 @@ this.InvalidSelectorError = function(msg) {
|
||||
};
|
||||
InvalidSelectorError.prototype = Object.create(WebDriverError.prototype);
|
||||
|
||||
this.InvalidSessionIdError = function(msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "InvalidSessionIdError";
|
||||
this.status = "invalid session id";
|
||||
this.code = 13;
|
||||
};
|
||||
InvalidSessionIdError.prototype = Object.create(WebDriverError.prototype);
|
||||
|
||||
/**
|
||||
* Creates an error message for a JavaScript error thrown during
|
||||
* executeScript or executeAsyncScript.
|
||||
|
Loading…
Reference in New Issue
Block a user