This removes the need to use a CPOW when sending keys to <input type=file>
elements. It was previously not possible to constructo File objects in
privileged content space, but this now appears fixed.
MozReview-Commit-ID: 8XOVsDdypwC
--HG--
extra : rebase_source : 8d4329c4c6a64ac717fc5d54dc42c8eb136f5e7f
"Check" is a fine word but with functions which primary purpose is to
throw an error internally we should use "assert" to make the reprecussions
of using them crystal clear.
MozReview-Commit-ID: Kef4R8y8fiV
--HG--
extra : rebase_source : eb22beb7a33e593f34b3d24ecdaaa7f99d8e5f87
Adds support for navigating to a fragment on the currenty visible document
without waiting for a DOM event that the document has been fully loaded.
This addresses https://github.com/mozilla/geckodriver/issues/150.
MozReview-Commit-ID: 7uiPT5cjGQE
--HG--
extra : rebase_source : f9152a6623a25c17e10dc3bc6552b8e635c21317
Currently Marionette returns directly from appInfo where the webdriver
specification mandates that we return lowercase for those. See
http://w3c.github.io/webdriver/webdriver-spec.html#capabilities
MozReview-Commit-ID: 4UrOcYRuREK
--HG--
extra : rebase_source : b47a4be6f4eb17e3bf9caf8542cc2f03582df946
With the initial browser defaulting to remote, there's a greater likelihood
that the DOMContentLoaded event that is handled in the "get" function will
be fired by the initial about:blank instead of the actual desired page.
get() currently works around this by ensuring that the URL of the loaded
page matches the requested one when DOMContentLoaded fires. Unfortunately,
this doesn't work for pages that redirect via their HTTP headers (and will
therefore not fire DOMContentLoaded).
This patch fixes things by adding an nsIWebProgressListener that ensures
that the requested page has started to load before paying any attention
to the DOMContentLoaded events. This handles the redirect case. We also
compare against nsIChannel.originalURI for the about: redirect case.
For neterror pages (which never open channels, and therefore are not
seen by the nsIWebProgressListener), we just check that the page that
we attempted to reach was the one that was requested.
MozReview-Commit-ID: Gbbmfwat46s
--HG--
extra : rebase_source : 1848cd67757be8780f9e50253dc0ee1131467257
Before, it was assumed that the next load was the one that the Marionette client had
asked for, when this might not be the case. For example, when a new window opens,
it's possible for the initial about:blank load to be fired in content after the
parent has asked for a page to be loaded.
MozReview-Commit-ID: GPoJgbCvSju
--HG--
extra : rebase_source : 7b4c1638c2fe81a0a37d061a655e35aed0e2daa0
extra : source : b2e910bb1d726562548eba1148a81ec37300fb7b
This aligns the return types with the spec and corrects the return type to
what GeckoDriver expects.
MozReview-Commit-ID: 5A63NfpHKXC
--HG--
extra : rebase_source : f6df6893194e78792e541b9e9dd316e4d456af26
This matches the Map data structure in JavaScript.
MozReview-Commit-ID: 5l2xOb4W2BC
--HG--
extra : rebase_source : 706f8e60fbfc364e56da83f15b9e1a4a94af9c9a
Renames instances of `elementManager' to `seenEls' for brevity. Also the
word "manager" does not really explain what purpose it fulfills.
MozReview-Commit-ID: 4EUN9utPoZS
--HG--
extra : rebase_source : 52bda0d83c50ffb96e72145ee54827c115596462
Moves ElementManager#wrapValue to the testing/marionette/element.js
module level and renames it to toJson.
MozReview-Commit-ID: GJBl2L1GRxZ
--HG--
extra : rebase_source : 5fc81a6b0ebfbd6a12557b3b746e6968c235d674
Moved ElementManager#convertWrappedArguments to the
testing/marionette/element.js module scope and renamed it to fromJson.
MozReview-Commit-ID: JMTZcG0JSUE
--HG--
extra : rebase_source : 613faca6a8c81b1ff435c538b0a7347ae548c288
Renames ElementManager to element.Store, exposing it on the
testing/marionette/element.js module. Shortens getKnownElement(uuid)
to get(uuid). Introduces new method has(uuid) to replace some unnecessary
checks in testing/marionette/driver.js and testing/marionette/listener.js.
MozReview-Commit-ID: D5qAlqrIxi
--HG--
extra : rebase_source : 22fda922e4c5f7bfcd1a5bcbcec6ae1003411535
Moves element retrieval methods from ElementManager to the
testing/marionette/element.js module itself. This means some more
work needs to be done by the caller, but avoids bloat by ensuring
ElementManager does not end up as a super-object.
MozReview-Commit-ID: 5LGe0vpSWwS
--HG--
extra : rebase_source : d7f4bd64cd1a92ad20a33496708d3f0136531d9f
The emulator code was originally hacks to allow us to instrument the emulator
from JavaScript in the B2G world. Since we no longer support this it is being
removed.
MozReview-Commit-ID: 3XDk21SFfUc
--HG--
extra : rebase_source : 63bc081c3ab37894b97b873fe142ee068b609318
Bug 1123506 rewrote all the emulator handling in the listener, and a few
of the emulator related functions in testing/marionette/listener.js are
no longer needed.
MozReview-Commit-ID: 1iTjuZwcOJf
--HG--
extra : rebase_source : 088e6bbdcd52f906f2df1677a926654c1d50fc81
In order to achieve WebDriver parity, Marionette needs the ability to
evaluate scripts in content space with lasting side-effects. This means
that state modifications should affect behaviour and state of the browsing
context, and such transgress the boundaries of the sandbox.
This patch brings a new script evaluation module that is shared between
code in chrome- and content space. This brings the number of unique
script evaluation implementations in Marionette down from six to one.
evaluate.sandbox provides the main entry-point for execution. It is
compatible with existing Marionette uses of Execute Script and Execute
Async Script commands in Mozilla clients, but also provides a new stateful
sandbox for evaluation that should have lasting side-effects.
It is not expected that Mozilla clients, such as testing/marionette/client
and the Node.js client in Gaia, should have to change as a consequence
of this change.
A substantial change to the script's runtime environment is that many
globals that previously existed are now only exposed whenever needed.
This means for example that Simple Test harness functionality (waitFor,
ok, isnot, is, &c.) is only available when using a sandbox augmented
with a Simple Test harness adapter.
Conversely, this patch does not expose marionetteScriptFinished as a
callback to asynchronous scripts for sandboxes which sandboxName parameter
is undefined, because this is what determines if the script should be
evaluated under WebDriver conformance constraints. In all other cases
where sandboxName _is_ defined, the traditional marionetteScriptFinished
et al. runtime environment is preserved.
MozReview-Commit-ID: 8FZ6rNVImuC
In order to achieve WebDriver parity, Marionette needs the ability to
evaluate scripts in content space with lasting side-effects. This means
that state modifications should affect behaviour and state of the browsing
context, and such transgress the boundaries of the sandbox.
This patch brings a new script evaluation module that is shared between
code in chrome- and content space. This brings the number of unique
script evaluation implementations in Marionette down from six to one.
evaluate.sandbox provides the main entry-point for execution. It is
compatible with existing Marionette uses of Execute Script and Execute
Async Script commands in Mozilla clients, but also provides a new stateful
sandbox for evaluation that should have lasting side-effects.
It is not expected that Mozilla clients, such as testing/marionette/client
and the Node.js client in Gaia, should have to change as a consequence
of this change.
A substantial change to the script's runtime environment is that many
globals that previously existed are now only exposed whenever needed.
This means for example that Simple Test harness functionality (waitFor,
ok, isnot, is, &c.) is only available when using a sandbox augmented
with a Simple Test harness adapter.
Conversely, this patch does not expose marionetteScriptFinished as a
callback to asynchronous scripts for sandboxes which sandboxName parameter
is undefined, because this is what determines if the script should be
evaluated under WebDriver conformance constraints. In all other cases
where sandboxName _is_ defined, the traditional marionetteScriptFinished
et al. runtime environment is preserved.
MozReview-Commit-ID: 8FZ6rNVImuC
--HG--
extra : rebase_source : 38cc7b1e374fd42afb213133fd1a5e11bf8bdd95
Implements the WebDriver pointer-interactability algorithm described in
http://w3c.github.io/webdriver/webdriver-spec.html#dfn-interactable-element.
The specification compatible behaviour is enabled only when the client
requests the capability specificationLevel >= 0.
MozReview-Commit-ID: BP60SGj49OW
--HG--
extra : rebase_source : d84d38510e28ab5e0debce2051e336e1fd3f0f86
Implements the WebDriver pointer-interactability algorithm described in
http://w3c.github.io/webdriver/webdriver-spec.html#dfn-interactable-element.
The specification compatible behaviour is enabled only when the client
requests the capability specificationLevel >= 0.
MozReview-Commit-ID: BP60SGj49OW
--HG--
extra : rebase_source : 357accaa38b44704fcaf839aa50e1e29af0b3f99
Removes the exported constants from testing/marionette/element.js and
introduces the migrates to using the element.Strategy enum consistently
throughout Marionette.
The supported strategies array passed into ElementManager's ctor has
also received some much needed attention and now actually works.
MozReview-Commit-ID: LPuDX0aishM
--HG--
extra : rebase_source : bb06ea5a25d9a0dbcd6f3e1311d31df95cd4e26d
This bug is also a dependency for scheduling Mn-e10s tests on Windows 7
(bug 1251351).
MozReview-Commit-ID: 2jE4C99d1MX
--HG--
extra : rebase_source : 96c9fad49538fdadcc8f001aeef5926e82419001
This change removes almost all the remaining uses of loadSubScript and
global scope pollution. The only remaining use is for common.js, which
is resolved by a later bug for evaluating scripts.
MozReview-Commit-ID: 96h0yLElauq
--HG--
extra : histedit_source : 70f70a8aeffef3fca18addfa3fca575a9128e11a
extra : rebase_source : c251c58a7a086c606d3d3941adfeee26ecc49504
extra : commitid : 8XlX4zVZQUN
extra : source : 6bb93562a57656e6cc744c3c901a5ec80f9ec4d8
extra : intermediate-source : ad5bf32d8fef351a0bc4d6249bd16a34aa83f548