Граф коммитов

68 Коммитов

Автор SHA1 Сообщение Дата
Henrik Skupin c1af84a166 Bug 1405370 - [marionette] Avoid usage of "window" for function arguments.
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
2018-09-18 14:51:21 +02:00
Andreas Tolfsen fb6205b6e2 Bug 1484161 - Replace nsITimer with Sleep for dispatchPause. r=whimboo 2018-08-17 11:57:29 +01:00
Maja Frydrychowicz 6f9ae9f66a Bug 1421323 - Ctrl+click should synthesize a contextmenu event; r=ato
Except on Windows.

MozReview-Commit-ID: LZ3CMyrVsDu

--HG--
extra : rebase_source : 21f832517526607dc964132731f9ba043ece072b
2018-06-14 18:42:33 -04:00
Henrik Skupin 7360e1e278 Bug 1467743 - [marionette] Handle errors for nested promise in dispatchPointerMove. r=ato
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
2018-06-08 13:11:30 +02:00
Henrik Skupin 63313b65f6 Bug 1429338 - Marionette has to honor "moz:useNonSpecCompliantPointerOrigin" capability. r=maja_zf
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
2018-01-23 17:31:06 +01:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
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
2018-02-06 09:36:57 -08:00
Kris Maglione 19a956c2c6 Bug 1431533: Part 5b - Fix ESLint errors left over after rewrite. r=florian
MozReview-Commit-ID: 7bVI1iM6hor

--HG--
extra : source : 0b97a30cadb1a96d3cafae6b79ef0d3ec26770cf
extra : amend_source : 09a90b29837e339eec7bdf8504f86c28e74ca3dd
extra : intermediate-source : a1eca62826a1341ca24d4d2a93d4884d4fc7ad51
extra : histedit_source : eb26e73b531f9a34d3401d39f60b533b27b78540
2018-01-18 16:27:26 -08:00
Kris Maglione 918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
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
2018-01-29 15:20:18 -08:00
Cosmin Sabou 9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione e050496c59 Bug 1431533: Part 5b - Fix ESLint errors left over after rewrite. r=florian
MozReview-Commit-ID: 7bVI1iM6hor

--HG--
extra : source : 0b97a30cadb1a96d3cafae6b79ef0d3ec26770cf
extra : amend_source : d0515fe4eb13b59cc490ca9d964ad9ee15ef3cd3
extra : intermediate-source : 6e56f4c8843ed134b2dba34fb007298fd55be966
extra : histedit_source : 88abf9f4ea4e740a9391278625ef07395205c3f5%2Cc14bc7a71eb413fcb573ed0d030fd7f99a1468f0
2018-01-18 16:27:26 -08:00
Kris Maglione 6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione e70d01a9e9 Bug 1431533: Part 5b - Fix ESLint errors left over after rewrite. r=florian
MozReview-Commit-ID: 7bVI1iM6hor

--HG--
extra : rebase_source : 6286dcfd1a7c970272ac6befaccd3e47e90d2f6b
extra : intermediate-source : d48657228a0b84cf3a37a35227ca3b3d0bd2a017
extra : source : 0b97a30cadb1a96d3cafae6b79ef0d3ec26770cf
2018-01-18 16:27:26 -08:00
Kris Maglione c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
muthuraj90ec@gmail.com 502bc1193d Bug 1385476 - Synthesize dblclick MouseEvent when performing webdriver actions; r=maja_zf
MozReview-Commit-ID: 9u2mtolhjUq

--HG--
extra : rebase_source : 76b2e3fbd3cbb86f062227c779e88e61fefc1d8d
2017-11-24 15:53:57 -05:00
Alan Williams 950cd321a9 Bug 1393831 - pointerMove action calculates wrong default element centre point. r=maja_zf
--HG--
extra : rebase_source : 32b0fecfa011b8bba9e5926316f124b2811bcded
2017-11-28 14:36:18 -05:00
Andreas Tolfsen 7abd1cfb0b Bug 1414329 - Make WebDriver:ClickElement wait for click events r=jgraham,whimboo
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
2017-11-03 19:20:46 +00:00
Mark Banner 60e4a05b0d Bug 1411368 - Automatically fix spaced-comment issues raised when using ESLint 4. r=mossop
MozReview-Commit-ID: AOFFadV3JrV

--HG--
extra : rebase_source : e06da861796c79f118ac734ceebee22253c0485f
2017-10-26 12:00:05 +01:00
Andreas Tolfsen c8ef9c9e6b Bug 1400256 - Adapt actions for implicitly unmarshaled elements. r=automatedtester
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
2017-10-09 19:55:27 +01:00
Andreas Tolfsen b4fef406e1 Bug 1400256 - Remove element.isWebElementReference. r=whimboo
Remove element.isWebElementReference in favour of
WebElement.isReference.

MozReview-Commit-ID: IOqx7XMUfCu

--HG--
extra : rebase_source : e25b0f709d3c11a6a26b937e9a72ca861fe34730
2017-10-05 17:07:48 +01:00
Andreas Tolfsen 7974848c51 Bug 1408454 - Move error.pprint to format.pprint. r=whimboo
Pretty-printing an object belongs more naturally to the new format module.

MozReview-Commit-ID: AfXLMPAT5ar

--HG--
extra : rebase_source : 1074febec66df49745256fc9cd04b0fecd293919
2017-10-13 17:59:30 +01:00
Andreas Tolfsen d9dd4eae1b Bug 1405018 - Consider current browsing context on staleness check. r=whimboo
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
2017-10-10 15:06:21 +01:00
Andreas Tolfsen 7b0b197759 Bug 1394849 - Export pprint separately. r=automatedtester
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
2017-08-29 17:33:38 +01:00
Andreas Tolfsen 29f6ebe13f Bug 1394881 - Use Node.isConnected for web element staleness check. r=automatedtester
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
2017-08-30 14:22:39 +01:00
Andreas Tolfsen f0f4363e58 Bug 1392318 - Use fromJSON convention in action module. r=automatedtester
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
2017-08-21 18:00:31 +01:00
Andreas Tolfsen b7180de1e8 Bug 1392323 - Correct use of pprint in action module. r=automatedtester
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
2017-08-21 18:09:40 +01:00
Andreas Tolfsen 34a091cffa Bug 1392339 - Fix misuse of nsIDOMWindow in API docs. r=automatedtester
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
2017-08-21 18:52:18 +01:00
Andreas Tolfsen fca9551967 Bug 1392281 - Pass window global to action module instead of container. r=automatedtester
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
2017-08-21 17:34:23 +01:00
Andreas Tolfsen 4e649b2c30 Bug 1388082 - Switch to async/await in action module. r=automatedtester
MozReview-Commit-ID: EREW0Hmmtb6

--HG--
extra : rebase_source : 6c9d6193e7031ee3f2d89042618f35cd36d303b1
2017-08-07 18:56:08 +01:00
muthuraj90ec 0d332730e8 Bug 1370403 - Synthesize contextmenu MouseEvent when performing webdriver actions; r=maja_zf
MozReview-Commit-ID: 85nQTsTRttF
2017-08-09 07:51:18 -04:00
Andreas Tolfsen dd7a57fd22 Bug 1384517 - Fix testing/marionette API docs; r=automatedtester
Various fixes to make the generated API documentation from
testing/marionette somewhat easier to read.

MozReview-Commit-ID: F9duuQoOYBt

--HG--
extra : rebase_source : 3ade69773ceba42826aedef05b1371240b51cf82
2017-07-26 13:11:53 +01:00
Andreas Tolfsen de001d80b7 Bug 1376128 - Lint testing/marionette; r=automatedtester
MozReview-Commit-ID: DY4yCSBEZrN

--HG--
extra : rebase_source : d4e25369418cc72a6ee9f78d44b050a87403391d
2017-06-29 16:40:24 -07:00
Andreas Tolfsen b8ac152de5 Bug 1376128 - Allow duplicated dictionary keys in action module; r=automatedtester
We duplicate many keys in the PUA key lookup tables.

MozReview-Commit-ID: 9X7mZh3A0Qb

--HG--
extra : rebase_source : 3d1a41488ea3a813d2880be332545f854695bb23
2017-06-28 11:06:42 -07:00
Andreas Tolfsen 54c2f296a7 Bug 1376128 - Use selective imports from error module; r=automatedtester
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
2017-06-28 11:01:49 -07:00
Maja Frydrychowicz 84b2b0814a Bug 1367430 - Set modifier-key properties for mouse action; r=ato
When synthesizing a MouseEvent for the performActions command,
set shiftKey, ctrlKey, etc., based on inputStateMap.

MozReview-Commit-ID: Knw3gxuAcSB

--HG--
extra : source : afcfa17be8acdd3d1b88b2bf8d6deffb53c52af1
2017-05-24 16:42:04 +02:00
Carsten "Tomcat" Book dc95c2f7ad Backed out changeset afcfa17be8ac (bug 1367430) for making bug 1365021 worse
--HG--
extra : rebase_source : e655ab964901f8fa3c4993ccf46b1c812b3957e7
2017-06-07 13:21:05 +02:00
Maja Frydrychowicz 149cdbbd02 Bug 1367430 - Set modifier-key properties for mouse action; r=ato
When synthesizing a MouseEvent for the performActions command,
set shiftKey, ctrlKey, etc., based on inputStateMap.

MozReview-Commit-ID: Knw3gxuAcSB

--HG--
extra : rebase_source : 499f6987fbc237662c925c7fedc83611e4de148b
2017-05-24 16:42:04 +02:00
Maja Frydrychowicz 0429c52c84 Bug 1345653 - Handle document unload when dispatching actions; r=ato
This fixes the reported hang that occurs after a pointer click
action resulting in navigation.

MozReview-Commit-ID: A9SBhextVLH

--HG--
extra : rebase_source : 7de7f06a1c05e0e52a03f1850187926aa13a4b08
2017-04-04 00:01:11 -04:00
Maja Frydrychowicz b3a4d2a5be Bug 1332279 - Include keyCode in KeyboardEvents synthesized for key actions; r=ato
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
2017-04-01 02:37:30 -04:00
David Burns cf2ed65938 Bug 1347658: Allow negative integers for Marionette pointerMove. r=maja_zf
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
2017-03-15 22:28:10 +00:00
Maja Frydrychowicz 13429c0338 Bug 1337133 - Move update of inputStateMap to action.Sequence.fromJson; r=ato+446296
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
2017-02-27 08:27:35 -05:00
Maja Frydrychowicz 4805fd0d60 Bug 1337133 - Dispatch pointerMove action for mouse; r=ato+446296,jgraham
MozReview-Commit-ID: 9CIGusZVz7w

--HG--
extra : rebase_source : 26a7495eb22b2db06cd9197564a19fe95de7dfef
2017-02-22 16:24:44 -05:00
Maja Frydrychowicz 36c442de86 Bug 1337133 - Dispatch pointerDown and pointerUp actions for mouse; r=ato+446296
MozReview-Commit-ID: FC0lF0S2Mzz

--HG--
extra : rebase_source : 1e956be81a3f0b757338bfaadf0cf8e257d3c2cf
2017-02-22 17:03:59 -05:00
Maja Frydrychowicz 1e1f032a63 Bug 1337133 - Fix creation of pointer InputState; r=ato+446296
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
2017-02-20 13:13:43 -05:00
Maja Frydrychowicz c5836d25cf Bug 1337133 - Replace element with origin for pointerMove actions; r=ato+446296
Sync processing of pointerMove with WebDriver spec.

MozReview-Commit-ID: DaHNipOffov

--HG--
extra : rebase_source : aa50717145b9e34a94a1a61c530522477062810c
2017-02-14 15:58:47 -05:00
Maja Frydrychowicz d7f6b20374 Bug 1337133 - Remove primary pointer attribute; r=ato+446296
Sync pointer parameters implementation with Webdriver spec.

MozReview-Commit-ID: 4DMoUxo648N

--HG--
extra : rebase_source : 37e4fb850f25b8fbdb7b48cde41abf9eb3beeab2
2017-02-06 14:40:13 -05:00
Maja Frydrychowicz 69ab8f6856 Bug 1341415 - Require action sequences to have an id; r=ato+446296
MozReview-Commit-ID: DjjhIdDJ8HI

--HG--
extra : rebase_source : e0474768ccc272392c97a58db541d27ad76ede1f
2017-02-21 15:08:09 -05:00
Maja Frydrychowicz 74f50780ba Bug 1335240 - actions.InputState does not record correct type for key and pointer; r=ato
MozReview-Commit-ID: 9RW0BretWU5

--HG--
extra : rebase_source : 22a542c35f01665cb2a4157df1fd0c6b96a6d980
2017-02-01 13:30:58 -05:00
Maja Frydrychowicz 259f6b6eda Bug 1328726 - Style fix ups in Marionette key actions implementation; r=ato
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
2017-01-04 17:48:11 -05:00
Wes Kocher abd222ddc9 Backed out 8 changesets (bug 1328726) for webdriver bustage a=backout CLOSED TREE
Backed out changeset 1039c2ca90ee (bug 1328726)
Backed out changeset de5830f1b8ab (bug 1328726)
Backed out changeset c039479ce446 (bug 1328726)
Backed out changeset 6d9673eedd91 (bug 1328726)
Backed out changeset be79eb6f9d64 (bug 1328726)
Backed out changeset 6be0203f1a26 (bug 1328726)
Backed out changeset 4430151d0cb4 (bug 1328726)
Backed out changeset 2143f1aa8087 (bug 1328726)

MozReview-Commit-ID: GrWBTO2rhXm
2017-01-25 10:51:08 -08:00