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

144 Коммитов

Автор SHA1 Сообщение Дата
Vangelis Katsikaros 6b506fe0d8 Bug 1279203 - Make Get Page Source command spec conformant; r=ato
This change aligns the Marionette command for getting the page's source
with the WebDriver specification, which mandates that we should return
the current browsing context's active document's outerHTML.

MozReview-Commit-ID: CYd3BIphn5G

--HG--
extra : rebase_source : b4c05cd62ca73edda8816c1c9768f3a8e9583098
2016-11-28 18:48:58 +02:00
Henrik Skupin d892209f99 Bug 1312674 - Navigating to about:blank for a new docshell should not timeout. r=ato
MozReview-Commit-ID: 3nmqJKEmu0p

--HG--
extra : rebase_source : 0c75d7259f9c377087300c8c3d2d59724614ed10
2016-11-28 13:32:11 +01:00
Andreas Tolfsen 5c6b5dd771 Bug 1103196 - Error on encountering invalid certificate; r=automatedtester
When arriving at a document which baseURI starts with `about:certerror`
will cause Marionette to now return `error.InsecureCertificateError`.
This is mandated by the WebDriver specification.

This does, however, mark a non-backwards compatible change in Marionette.
It is assumed we will be able to mitigate this change in error type as
few consumers, if any, rely on the more generic type considering we did
not support invalid TLS certificates prior to this push.

MozReview-Commit-ID: JcIMvCXimB

--HG--
extra : rebase_source : 5e2dffe8e5d16ae3fe407ed42c43d52b49e3741d
2016-11-06 18:01:23 +00:00
Sebastian Hengst 96d5b195ad Backed out changeset f27d827ba404 (bug 1103196) 2016-11-25 00:18:23 +01:00
Andreas Tolfsen a8326f61b5 Bug 1103196 - Error on encountering invalid certificate; r=automatedtester
When arriving at a document which baseURI starts with `about:certerror`
will cause Marionette to now return `error.InsecureCertificateError`.
This is mandated by the WebDriver specification.

This does, however, mark a non-backwards compatible change in Marionette.
It is assumed we will be able to mitigate this change in error type as
few consumers, if any, rely on the more generic type considering we did
not support invalid TLS certificates prior to this push.

MozReview-Commit-ID: JcIMvCXimB

--HG--
extra : rebase_source : 9ed8aa636192f45b30399af6bed9858bed3bad46
2016-11-06 18:01:23 +00:00
Maja Frydrychowicz 6da8812934 Bug 1303234 - Implement extracting action chain from a request; r=ato,jgraham
MozReview-Commit-ID: JxNoGZog1om

--HG--
rename : testing/marionette/action.js => testing/marionette/legacyaction.js
extra : rebase_source : 91e9b1915e18362765804e3767dfb834394a35af
2016-10-26 13:04:48 -04:00
Andreas Tolfsen b2605976f0 Bug 1302707 - Fix type check to allow page loading timeout of 0; r=automatedtester
The `get` function in testing/marionette/listener.js used an evaluated
if-condition test to determine if a page timeout was given.  This would
fail if passed 0 because 0 evaluates to false in JavaScript.

This patch fixes the incorrect type check by looking at whether the
variable has been defined or not.

MozReview-Commit-ID: 39vDZRjKAFb

--HG--
extra : rebase_source : f8100e05f9b1165e20b5aaab6e89b09fd110b3d2
2016-09-27 13:07:28 +01:00
Ryan VanderMeulen 3611a7607d Merge inbound to m-c. a=merge 2016-08-31 22:33:17 -04:00
Kartikaya Gupta 114ff898bb Bug 1299488 - Remove TabParent::InjectTouchEvent as it is unused but error-prone. r=botond
MozReview-Commit-ID: EVBRK70veT1
2016-08-31 16:54:23 -04:00
Andreas Tolfsen e3a3466f75 Bug 1244425 - Avoid CPOW when setting file array on <input type=file>; r=automatedtester
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
2016-08-30 12:46:01 +01:00
Andreas Tolfsen 0f34b42611 Bug 1280947 - Dispatch DOM change event on appending file to input; r=automatedtester
MozReview-Commit-ID: 6SC01AEkuTs

--HG--
extra : rebase_source : ee4ed323e024bf6fdcf9a28ab7f44763c7475c8c
2016-08-25 14:18:04 +01:00
Andreas Tolfsen a6a86c1771 Bug 1255955 - Rename a11y functions check* to assert*; r=automatedtester
"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
2016-08-05 11:43:40 +01:00
Andreas Tolfsen 175975b04b Bug 1280300 - Support navigation by fragment; r=automatedtester
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
2016-07-19 18:47:33 +01:00
David Burns 8ae5a3c2be Bug 1288863: Return platformName and browserVersion as lowercase r=ato
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
2016-07-26 10:13:35 +01:00
Mike Conley d9c28dead6 Bug 1261842 - Make sure Marionette can handle the redirect and error page cases. r=automatedtester
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
2016-07-20 10:03:52 -04:00
Mike Conley 69b9435ec3 Bug 1261842 - Make Marionette listener ensure that the loaded document is the one that was actually requested. r=ato
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
2016-05-27 16:26:16 -04:00
David Burns 72b6cf6661 Bug 1281397: Correct return types getElementProperty in marionette r=ato
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
2016-06-24 09:25:03 +01:00
Andreas Tolfsen fe3135e034 Bug 1274550 - Return web element from Get Active Element; r=automatedtester
MozReview-Commit-ID: I5WHfJbMfPZ

--HG--
extra : rebase_source : c9ebc8ebfd4450f6ba6320321977472fe40e2675
2016-05-26 13:04:22 +01:00
Andreas Tolfsen ed4aa96ea4 Bug 1274274 - Rename element store clear function to delete; r=automatedtester
This matches the Map data structure in JavaScript.

MozReview-Commit-ID: 5l2xOb4W2BC

--HG--
extra : rebase_source : 706f8e60fbfc364e56da83f15b9e1a4a94af9c9a
2016-05-20 16:54:42 +01:00
Andreas Tolfsen 6686a00fd4 Bug 1274274 - Rename element manager; r=automatedtester
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
2016-05-20 16:49:19 +01:00
Andreas Tolfsen fb76d98e20 Bug 1274274 - Disassociate wrapValue from element store; r=automatedtester
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
2016-05-20 16:32:31 +01:00
Andreas Tolfsen 76e7173ffa Bug 1274274 - Disassociate convertWrappedArguments from element store; r=automatedtester
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
2016-05-20 16:16:56 +01:00
Andreas Tolfsen 0f872f6301 Bug 1274274 - Refactor seen element store; r=automatedtester
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
2016-05-20 15:07:21 +01:00
Andreas Tolfsen c47354a3ef Bug 1274274 - Decouple element retrieval methods; r=automatedtester
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
2016-05-20 13:28:27 +01:00
David Burns 20c4d3ef26 Bug 1274408: Remove emulator support from Marionette in Gecko r=ato
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
2016-05-24 10:22:54 +01:00
Andreas Tolfsen 47fd1a56f6 Bug 1272653 - Make Get Element Attribute spec compatible; r=automatedtester
MozReview-Commit-ID: K5PsnmRrDJk
2016-05-24 10:34:23 +01:00
Andreas Tolfsen adc408c1da Bug 1272653 - Implement WebDriver command Get Element Property; r=jgriffin
MozReview-Commit-ID: 5lfZkSYPthb
2016-05-24 10:34:17 +01:00
Andreas Tolfsen 565d902519 Bug 1271596 - Remove unused emulator command functions; r=automatedtester
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
2016-05-10 11:50:57 +01:00
Andreas Tolfsen 1d15796afc Bug 1123506 - Evaluate scripts in content with lasting side-effects; r=automatedtester
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
2016-05-09 16:08:17 +01:00
Wes Kocher 6586a41d87 Backed out changeset 08754cfc737c (bug 1123506) for various test bustage due to ` JavascriptException: JavascriptException: ReferenceError: __marionetteParams is not defined` CLOSED TREE 2016-05-06 15:12:14 -07:00
Andreas Tolfsen 2b77034fa3 Bug 1123506 - Evaluate scripts in content with lasting side-effects; r=automatedtester
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
2016-02-26 14:36:39 +00:00
Kim Brown 3d3fc8c2d4 Bug 905650 - Added ability to get the hash of a screenshot; r=ato
MozReview-Commit-ID: 3NL7nkqpG6I

--HG--
extra : rebase_source : 1126849b99aaa622c402d350bc6d67ac192e4b7a
2016-04-17 21:37:14 -04:00
Andreas Tolfsen f6bfff23ab Bug 1257523 - Remove unused imports; r=automatedtester
MozReview-Commit-ID: K12laAg8zLy

--HG--
extra : rebase_source : 01f495019e69ac859b3f7eb7653a14653477bb93
2016-03-17 14:29:41 +00:00
Andreas Tolfsen 158557f87b Bug 1245064 - Pass all capabilities to listener; r=automatedtester
MozReview-Commit-ID: 2UgKKAUowM4

--HG--
extra : rebase_source : 5ffd21c06fb98ac908d5118f55736b5f4271ff95
2016-03-04 18:02:56 +00:00
Andreas Tolfsen e3854ffb41 Bug 1245064 - Implement element pointer-interactability; r=automatedtester
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
2016-03-04 16:44:38 +00:00
Andreas Tolfsen 71b94d4505 Bug 1245064 - Refactor interaction- and accessibility API; r=automatedtester
MozReview-Commit-ID: LblRZz8KqPx

--HG--
extra : rebase_source : fbb7995924c7e2707e2aaa2293b8a5c51fc563bc
2016-03-03 13:58:13 +00:00
Carsten "Tomcat" Book 84efe80138 Backed out changeset 4dec8d87c105 (bug 1245064) for marionette bustage 2016-03-09 14:03:28 +01:00
Carsten "Tomcat" Book 38c337c81b Backed out changeset 1dd0bcc1c45e (bug 1245064) 2016-03-09 14:03:07 +01:00
Carsten "Tomcat" Book b685a90a5e Backed out changeset 2483596f62ef (bug 1245064) 2016-03-09 14:03:04 +01:00
Andreas Tolfsen 64ff8c0c0e Bug 1245064 - Pass all capabilities to listener; r=automatedtester
MozReview-Commit-ID: 2UgKKAUowM4

--HG--
extra : rebase_source : aae2e03f133b21ab1e65b51aebdec155a2990beb
2016-03-04 18:02:56 +00:00
Andreas Tolfsen ed18a3de7d Bug 1245064 - Implement element pointer-interactability; r=automatedtester
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
2016-03-04 16:44:38 +00:00
Andreas Tolfsen fcdf164815 Bug 1245064 - Refactor interaction- and accessibility API; r=automatedtester
MozReview-Commit-ID: LblRZz8KqPx

--HG--
extra : rebase_source : 347210842fae698acde760c2733dd8d882a09c25
2016-03-03 13:58:13 +00:00
Andreas Tolfsen 1a08c44699 Bug 1253244 - Use element.coordinates in listener; r=automatedtester
MozReview-Commit-ID: 4sWZNXrenqZ

--HG--
extra : rebase_source : 8a212826ff0dbe4a2555a9712f7fd7039f7ad5ff
2016-03-03 14:28:40 +00:00
Andreas Tolfsen 772f8fbb0b Bug 1253248 - Use element.Strategy enum consistently; r=automatedtester
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
2016-03-04 12:01:09 +00:00
Andreas Tolfsen a1495c253c Bug 1253236 - Remove window argument from element.isVisible; r=automatedtester
MozReview-Commit-ID: ITzY9RXjJCG

--HG--
extra : rebase_source : 7954e5d2891a8d214fdbf00ea1b0b62acc0482b3
2016-03-03 14:20:39 +00:00
Andreas Tolfsen 4a0bcbbee4 Bug 1253236 - Rename element.checkVisible to isVisible; r=automatedtester
MozReview-Commit-ID: 1fkH93OXjWF

--HG--
extra : rebase_source : 39c628d9ca7ef1713a68e620a8c759813c5415fc
2016-03-03 14:18:52 +00:00
Andreas Tolfsen 278e4c6847 Bug 1251701 - Store imported scripts in memory; r=jgriffin
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
2016-02-29 18:52:30 +00:00
Andreas Tolfsen 46bb47edff Bug 1250102 - Employ new element location API; r=automatedtester
MozReview-Commit-ID: K831MhwAT6X

--HG--
extra : rebase_source : 6f3edeb2b42d8168887738ce4863cc8e15bf5d05
2016-02-23 15:19:21 +00:00
Andreas Tolfsen cb2ec4bbdf Bug 1250102 - Correct exported symbol from testing/marionette/element.js; r=automatedtester
MozReview-Commit-ID: 9naIfpy9HPD

--HG--
extra : rebase_source : dc6b96137ed6c378772477cc36687a1655028ae3
2016-02-23 15:01:12 +00:00
Andreas Tolfsen 04268e1ed9 Bug 1242655 - Have ActionChain#dispatchActions return a promise; r=automatedtester
MozReview-Commit-ID: ITqAH4rVsHc

--HG--
extra : rebase_source : 678d4097585bedde7f12b646106a592cf42598d3
2016-02-22 13:18:13 +00:00