The temporarily created sockets have to be removed immediately
by the operating system. Otherwise those enter the TIME_WAIT state,
and will be removed about 90s later. This can cause a pile of orphaned
sockets.
MozReview-Commit-ID: BGy9ZOjhjT0
--HG--
extra : rebase_source : f2e96d3e8d5d022b18c5f73daa15f3f8f06c74c5
Simply checking '_acceptConnections' when clients are trying to
connect to Marionette, and revoking the connection request inside
of 'onSocketAccepted' is plainly wrong, given that a connection is
already present.
Instead put the socket server into close state, which means it
does no longer listen for new connection attempts until new
connections are accepted again.
MozReview-Commit-ID: JIpOgOjnpDY
--HG--
extra : rebase_source : 6caa49fa81aec4a5fcf4bdbd3a4290b837a14281
As the method name describes the primary functionality of this method
should be to wait for the specific port to be reachable. Specific
application verification is done anyway in the 'newSession' command.
Also the temporarily created sockets have to be removed immediately
by the operating system. Otherwise those enter the TIME_WAIT state,
and will be removed about 90s later. This can cause a pile of orphaned
sockets.
MozReview-Commit-ID: BGy9ZOjhjT0
--HG--
extra : rebase_source : 54ce1fe1f9cd82dc53e205be057f11d99ccb4291
Simply checking '_acceptConnections' when clients are trying to
connect to Marionette, and revoking the connection request inside
of 'onSocketAccepted' is plainly wrong, given that a connection is
already present.
Instead put the socket server into close state, which means it
does no longer listen for new connection attempts until new
connections are accepted again.
MozReview-Commit-ID: JIpOgOjnpDY
--HG--
extra : rebase_source : 6caa49fa81aec4a5fcf4bdbd3a4290b837a14281
For ASAN builds the crashreporter is not available. As such the unit
tests for crash handling should not be executed. But it should be fine
to re-enable all the other unit tests.
MozReview-Commit-ID: BPFshl7vvqM
--HG--
extra : rebase_source : b40805e0e681eb75c7351299351447860144ba56
Since web element references are now implicitly unmarshaled when
they are passed to the content frame script, there is no need for
the actions module to check that the element origin is a reference
and try to look it up from the known element store.
MozReview-Commit-ID: 3BGBIBQMtR3
--HG--
extra : rebase_source : 1505fe15b060f85ad34628f34f67cfe96aaaa9c1
Instead of having commands serialising their own JSON-safe messages
when communicating with the content frame script, this patch changes
the AsyncMessageChannel to use evaluate.toJSON.
MozReview-Commit-ID: LmAVGEjqMTB
--HG--
extra : rebase_source : 7f39cccc1468217a8a6bcf107241fd5648cb24d2
Remove element.isWebElementReference in favour of
WebElement.isReference.
MozReview-Commit-ID: IOqx7XMUfCu
--HG--
extra : rebase_source : e25b0f709d3c11a6a26b937e9a72ca861fe34730
This patch introduces a series of web element abstraction types for
representing web element references.
Adds a series of new types for representing web element references
in Marionette: ChromeWebElement, ContentWebElement, ContentWebFrame,
and ContentWebWindow. The last three are direct representations of
web element, web frame, and web window definitions described in the
Webdriver specification. The first is a custom Marionette type as
we also support retrieving XUL elements from chrome space and must
be considered proprietary.
Each of the classes extend the WebElement abstract type, which is
the primary entry point when unmarshaling JSON input from the client.
Based on the characteristics of the JSON Object, one of the different
concrete types will be constructed.
The purpose of this change is to make marshaling of elements and
WindowProxies easier, both when we receive web element reference
objects from clients and when transporting them over IPC internally.
The WebElement.fromUUID function should be considered a temporary
workaround until we have fixed the current Marionette clients to send
web element reference JSON Objects as input, instead of plain {id:
<uuid>, …} fields.
MozReview-Commit-ID: FGcRq5H1Tzp
--HG--
extra : rebase_source : fe82087e8935adb519e2934fc37f1d46c21d9187
To avoid circular dependencies, where file A depends on B depending
on A, we should strive towards fewer inter-dependencies and more
autonomy between modules.
For example, if testing/marionette/browser.js needs access to
the Context enum it can currently only attain it by importing
testing/marionette/driver.js. Because driver.js imports browser.js,
we create a circular dependency and Cu.import enters an infinite
import recursion.
MozReview-Commit-ID: LGiA9sy9xrd
--HG--
extra : rebase_source : f1748894c4309a5bc34b72acd4931d7937e8810e
Introduces new element.isElement shorthand API for identifying DOM-,
SVG-, and XUL elements.
It is the equivalent of this:
if (element.isDOMElement(el) ||
element.isSVGElement(el) ||
element.isXULElement(el)) {
// ...
}
MozReview-Commit-ID: H8MDkP5bQmW
--HG--
extra : rebase_source : 6bef09999e47b178614e4bd307266b4449f39901
In addition to tell DOM- and XUL elements apart we will in the
future need to identify WindowProxies because WebDriver expects
there to be a separate "web window" serialisation for these.
Telling if an abritrary object is a WindowProxy is tricky but we
check if its node.toString is callable, that it returns "[object
Window"], and finally that its "self" attribute is itself. This is
not perfect, but good enough for now.
MozReview-Commit-ID: 6FLOa3qYLPP
--HG--
extra : rebase_source : 27d25d97facf73761a1600e88d938eb76b3bc005
Introduces a new element.isDOMElement function, similar to isXULElement,
for checking whether an element is a DOM element.
It follows the same formula as isXULElement by first testing if the
element is an object so we know we can accesss node.namespaceURI
and node.nodeType without causing a JS error.
MozReview-Commit-ID: 6Mlo33vu5LG
--HG--
extra : rebase_source : 547a2fc5bc0051e3bb51e14add4f57d1ff7972b9
Fixes isXULElement to recognise XBL elements, such as <xbl:framebox>.
Also tightens up the input checks so that arbitrary objects can be
tested, as checking node.namespaceURI directly could cause a JS error
if node is not an object. Before checking the namespace we also ensure
it's an element node so that text- and comment nodes are not picked up.
This patch also introduces tests, which were sorely missing.
MozReview-Commit-ID: 8LNF1z3X1gP
--HG--
extra : rebase_source : ffacc5b1336b35624aaf0534101ce5c3fbdeaa95
To avoid circular dependencies, where file A depends on B depending
on A, we should strive towards fewer inter-dependencies and more
autonomy between modules.
For example, if testing/marionette/browser.js needs access to
the Context enum it can currently only attain it by importing
testing/marionette/driver.js. Because driver.js imports browser.js,
we create a circular dependency and Cu.import enters an infinite
import recursion.
MozReview-Commit-ID: LGiA9sy9xrd
--HG--
extra : rebase_source : e4b69c91b9cf78705c902f1e5038d815b88114d0
The test currently performs checks which will no longer raise the expected
accessibility exceptions if the webdriver conforming click is enabled. In
such a condition those specific situations are already covered in
test_click.py.
As long as the legacy click has not been fully removed keep running the
checks but only if the webdriver click is not in use.
MozReview-Commit-ID: 1DbKfJYADp
--HG--
extra : rebase_source : 2f56caf977f88768b1df2ad507587091af8708ba
The upcoming window tracking refactoring to Marionette will introduce
a new testing/marionette/wm.js module. It was originally the plan
to move WindowState there after it had landed, but it actually makes
sense to land any dependencies before to reduce churn in the window
tracking patches.
MozReview-Commit-ID: EpqnTYYGcmg
--HG--
extra : rebase_source : d6760feefa49c522738fd3930b339bc0af70e6a5
The WebDriver:FindElement command returned an array of elements when
looking up anonymous elements. This patch rectifies the behaviour
so that only a single element is returned.
It introduces a new helper function called element.findAnonymousNodes,
akin to similar helper functions for other strategies. This function
returns an iterator of anonymous nodes so that WebDriver:FindElements
(plural) and WebDriver:FindElement (singular) can share the same
code path.
MozReview-Commit-ID: 3IqPyAIZHtf
--HG--
extra : rebase_source : ceffd2b3dfe885b98ae31905f290ab9d95ef26c0
This page is now covered by geckodriver documentation and most
Selenium clients have built-in support for geckodriver.
DONTBUILD
MozReview-Commit-ID: BrqqU8trbRU
--HG--
extra : rebase_source : a699eb206915995b4fda6c6b6542dd58bcf5613c
This information is already covered in README.md.
DONTBUILD
MozReview-Commit-ID: CoaPQeIyNmA
--HG--
extra : rebase_source : 0fbd664c8d6a8bf9cf2489534ac4ba794339db57
Contribution information is covered by CONTRIBUTING.md.
DONTBUILD
MozReview-Commit-ID: 7MLBfFaFe7L
--HG--
extra : rebase_source : 8fe6ae96cfe634d73ada7d56df763124c70a43d9
If the action chain fails it will cause a JS error because its
prototype will be wrong.
MozReview-Commit-ID: 6Wbjdw2KHNV
--HG--
extra : rebase_source : 5f57b525fc846bae3bc579a3d074c0f4d793c008
Pretty-printing an object belongs more naturally to the new format module.
MozReview-Commit-ID: AfXLMPAT5ar
--HG--
extra : rebase_source : 1074febec66df49745256fc9cd04b0fecd293919
The issue here was that the cookie domain was always prepended with
'.' character. To resolve this edge-case Marionette now first checks
whether the cookie domain is in fact an IP address.
MozReview-Commit-ID: 4xBd4rscXxx
--HG--
extra : rebase_source : 92bf20ceb43c05f4610e3e0a5411027300586784