To avoid confusion with the global "window" object we should
avoid using this name as function argument.
Changes for driver.js are left-out and will be done by the
patch on bug 1311041.
--HG--
extra : rebase_source : f15714af3a422476923d096eb8cb837ae474c675
Because the nested promise doesn't use the "catch()" method a
possible raised error by its code is not handled, and will
cause the outer promise never to resolve, which results in an
infinite hang.
MozReview-Commit-ID: 1MFyKpmOjYz
--HG--
extra : rebase_source : 5bcbb03a3e9356faf610135b92ecb89e946cd2ed
This flag is used to turn off the WebDriver spec conforming pointer origin
calculation. It has to be kept until all Selenium bindings can successfully
handle the WebDriver spec conforming Pointer Origin calculation.
MozReview-Commit-ID: 3YknXlWoyi1
--HG--
extra : rebase_source : 6df2af027e7458fd29658d7a3bbe99634b6f58f9
This patch was autogenerated by my decomponents.py
It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.
It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.
It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)
MozReview-Commit-ID: DeSHcClQ7cG
--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm
MozReview-Commit-ID: 1Nc3XDu0wGl
--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm
MozReview-Commit-ID: 1Nc3XDu0wGl
--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm
MozReview-Commit-ID: 1Nc3XDu0wGl
--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
This changes interaction.flushEventLoop from relying on the beforeunload
DOM event to determine when to bail in case the document navigates.
Instead, it now relies on the unload event which should not affect
bfcache.
It also changes flushEventLoop to append a click event listener to
the targetted element's container element. Because this event will
be added last, the intention is that all preceding click evens will
have had time to fire and propagate before our listener spins the
event loop through setTimeout once.
Our listeners are added using the privileged mozSystemGroup option so
that a potential invocation of EventTarget.stopImmediatePropagation
does not prevent our listener from firing.
MozReview-Commit-ID: 2Ehxwg2p6Fo
--HG--
extra : rebase_source : 767bc955ba49152ff501ee8ff9c856fe204b25f4
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
Remove element.isWebElementReference in favour of
WebElement.isReference.
MozReview-Commit-ID: IOqx7XMUfCu
--HG--
extra : rebase_source : e25b0f709d3c11a6a26b937e9a72ca861fe34730
Pretty-printing an object belongs more naturally to the new format module.
MozReview-Commit-ID: AfXLMPAT5ar
--HG--
extra : rebase_source : 1074febec66df49745256fc9cd04b0fecd293919
The element.isStale function does not take into account the current
browsing context when checking an element’s staleness. This means,
for example, that an element in an <iframe> that gets retrieved, will
still be considered valid for as long as its associated document lives.
In WebDriver the expected behaviour is for the element reference to
only be valid for the current browsing context, meaning retrieving
the element reference when another browsing context is chosen should
return a stale element error.
Fixes: https://github.com/mozilla/geckodriver/issues/934
MozReview-Commit-ID: JpQVt78u5AN
pprint is currently exposed twice: once on the error namespace and once
separately. We only want to expose it once, and since there are only a
handful "error.pprint" usages left, we can go ahead and make this change.
When we move transition to use "require" in the future, like devtools
does, it will be possible to use both "error.pprint" and "pprint" styles
without export duplication.
MozReview-Commit-ID: CAnPDWn9Vr7
--HG--
extra : rebase_source : 05a05460d710eb96fa7b20cb94477be0282809de
It turns out that Node.isConnected (described in
https://dom.spec.whatwg.org/#dom-node-isconnected) handles an element’s
shadow root, which element.isDisconnected tries to replicate.
element.isDisconnected and element.isStale are both long and error-prone
and can be removed entirely in favour of this web platform API.
The relevant change to the WebDriver specification landed in
32a477b023.
MozReview-Commit-ID: 5Q0gWLvw8KL
--HG--
extra : rebase_source : 773ab302df27cf11be6079f918a48d3730ceb5c1
The convention is to use fromJSON (instead of fromJson) because this
gives parity to toJSON which is supported by JSON.stringify.
MozReview-Commit-ID: 9dX14pFO2Bj
--HG--
extra : rebase_source : d0c1d657eee1f84d34e5a7116d8bb9ca579c8b51
In certain places, the Marionette action module calls error.pprint as
if it is a function. pprint is a ES6 string template and should be used
like pprint`${replacement}`.
MozReview-Commit-ID: 29UoCNxkKa7
--HG--
extra : rebase_source : f8fe408827353f78ee223175316d5b5f9b6a8df5
nsIDOMWindow is the XPCOM interface and not what we mean in all these
cases. We either want to refer to the ChromeWindow or to the WindowProxy,
depending on the context of the code.
MozReview-Commit-ID: 405po1XLXRi
--HG--
extra : rebase_source : 47a179f7caed76592dab28f8e10550cda5fe3d02
Various functions in the action module take a container object such as
{frame: <WindowProxy global>, shadowRoot: <Element>}
when it in fact never uses the shadowRoot entry. As part of the new
window tracking we will get rid of the container concept altogether.
Because the action module is sufficiently self-contained, we can start
with removing it from there already.
MozReview-Commit-ID: KeeNF08mqnX
--HG--
extra : rebase_source : 51eee50a648a994fab456adf4add46c91a6c82a3
Various fixes to make the generated API documentation from
testing/marionette somewhat easier to read.
MozReview-Commit-ID: F9duuQoOYBt
--HG--
extra : rebase_source : 3ade69773ceba42826aedef05b1371240b51cf82
We duplicate many keys in the PUA key lookup tables.
MozReview-Commit-ID: 9X7mZh3A0Qb
--HG--
extra : rebase_source : 3d1a41488ea3a813d2880be332545f854695bb23
Instead of importing everything from the testing/marionette/error.js
module into the global scope, we need to be selective about what symbols
we want.
MozReview-Commit-ID: HZDAS0bs0GD
--HG--
extra : rebase_source : 14a300bb2cedc0716168d50846755a6faed83012
When synthesizing a MouseEvent for the performActions command,
set shiftKey, ctrlKey, etc., based on inputStateMap.
MozReview-Commit-ID: Knw3gxuAcSB
--HG--
extra : source : afcfa17be8acdd3d1b88b2bf8d6deffb53c52af1
When synthesizing a MouseEvent for the performActions command,
set shiftKey, ctrlKey, etc., based on inputStateMap.
MozReview-Commit-ID: Knw3gxuAcSB
--HG--
extra : rebase_source : 499f6987fbc237662c925c7fedc83611e4de148b
This fixes the reported hang that occurs after a pointer click
action resulting in navigation.
MozReview-Commit-ID: A9SBhextVLH
--HG--
extra : rebase_source : 7de7f06a1c05e0e52a03f1850187926aa13a4b08
The key dispatch functions now pass the raw key to event.js,
which determines the keyCode for the event.
Note the change in Normalized Key Value for Enter versus Return.
The browser throws an exception when the event key attribute is
set to "Return" and KEY_NON_PRINTABLE_KEY is set, which implies
that the key value isn't valid. Changing it to Enter fixes the
issue.
MozReview-Commit-ID: 831f4EcqI1P
--HG--
extra : rebase_source : 6045b6199c72bcc7a971907d6e1513687d8ed3f9
W3C WebDriver spec had incorrectly described that we could only have
positive integers when it should have been just Integers.
MozReview-Commit-ID: CttUFKiav7q
--HG--
extra : rebase_source : 0a3049ce25f38557b9f1218dde45ef37f2a1b245
This syncs the implementation of "process an input source action sequence"
with the Webdriver spec.
Previously, Marionette populated the input state table at dispatch time.
MozReview-Commit-ID: 8v1y5uVvrI5
--HG--
extra : rebase_source : b8dabf16baa85aa7b3af1882846055a0e260232e
Previously, the pointer input state was always being created
with an undefined subtype, which should actually be mouse, pen
or touch.
MozReview-Commit-ID: JcarsRRecQl
--HG--
extra : rebase_source : 4130d3e5cd0dc2d953fdf48e3591de7b0f53383e
Sync processing of pointerMove with WebDriver spec.
MozReview-Commit-ID: DaHNipOffov
--HG--
extra : rebase_source : aa50717145b9e34a94a1a61c530522477062810c
These are leftover from review of Bug 1320389. I must have forgotten to
re-push to MozReview.
MozReview-Commit-ID: ENTFdmCsv6I
--HG--
extra : rebase_source : 3c6961fb1826cb7cc00d1bd6048ed2c94c9a2f1a