Commit Graph

2836 Commits

Author SHA1 Message Date
Andreas Tolfsen
0b25415ec8 Bug 1388082 - Update proxy examples and docs. r=automatedtester
MozReview-Commit-ID: AhR9ZSxpHQF

--HG--
extra : rebase_source : f86efa4c58c080135f9d47248300e321120186ae
2017-08-07 18:57:11 +01:00
Andreas Tolfsen
65b371f187 Bug 1388082 - Switch to async/await in interaction module. r=automatedtester
MozReview-Commit-ID: 2aUUrT3KXRF

--HG--
extra : rebase_source : c8d9b411c59da2979fc9b08fa1d09afec8f82d9b
2017-08-07 18:56:29 +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
Andreas Tolfsen
ac8a376af8 Bug 1388082 - Convert execute script methods to async. r=automatedtester
MozReview-Commit-ID: 6oUZ4v8snh0

--HG--
extra : rebase_source : 1ce7c286b0bce68ffaf74a6c8235ce57ca39af8a
2017-08-07 16:53:02 +01:00
Andreas Tolfsen
351fdfb92f Bug 1388082 - Make WebDriver service use async/await. r=automatedtester
MozReview-Commit-ID: A1dW91OvGcG

--HG--
extra : rebase_source : af8cf1d157f2fe4fdcd0e96b06ebe87e23d22a73
2017-08-07 16:52:37 +01:00
Sebastian Hengst
56c035fa36 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4cZJ3qFjvPY
2017-08-12 23:49:21 +02:00
Wes Kocher
ef0d82bb2b Merge m-c to inbound, a=merge
MozReview-Commit-ID: HSkzFTcnhOy
2017-08-11 13:25:37 -07:00
Wes Kocher
3985469cdb Bug 1388424 - Fix flake8 issue a=me
MozReview-Commit-ID: 4OcGtGQfgyD
2017-08-11 13:04:38 -07:00
Andreas Tolfsen
94e1614eb3 Bug 1388424 - Read capabilities off top-level object. r=whimboo
geckodriver sends capabilities as a JSON Object in the body of the
command, like this:

	[0,1,"newSession",{"acceptInsecureCerts":true}]

With https://bugzil.la/1387380 we wanted the Marionette Python client
to match this behaviour, however the patch overlooked the fact that
the server reads cmd.parameters.capabilities, meaning it looks for a
"capabilities" field on this object instead of treating the object as
the dictionary of capabilities.

As a follow-up to that bug, this patch removes the ability to override
the session ID by specifying a "sessionId" field.  This functionality
was only used for in-app restart tests.  When Firefox restarts, the
Marionette session is arguably not the same, and sessions should not
live on between restarts.

This patch will fix capabilities passed from geckodriver and align the
Marionette Python client.

For backwards compatibility reasons, it needs to be possible to use the
Python client with older Firefoxen that reads cmd.parameters.capabilities
instead of cmd.parameters.  This is why we duplicate the capabilities
object, like geckodriver does.

MozReview-Commit-ID: DCpaxl9hOLe
2017-08-11 11:06:15 +02:00
Sebastian Hengst
c3f9d66a33 Backed out changeset 2cf4290c2eef (bug 1388424) for failing marionette's test_quit_restart.py TestQuitRestart.test_force_clean_restart. r=backout 2017-08-11 12:11:14 +02:00
Andreas Tolfsen
43dd368771 Bug 1388424 - Read capabilities off top-level object. r=whimboo
geckodriver sends capabilities as a JSON Object in the body of the
command, like this:

	[0,1,"newSession",{"acceptInsecureCerts":true}]

With https://bugzil.la/1387380 we wanted the Marionette Python client
to match this behaviour, however the patch overlooked the fact that
the server reads cmd.parameters.capabilities, meaning it looks for a
"capabilities" field on this object instead of treating the object as
the dictionary of capabilities.

As a follow-up to that bug, this patch removes the ability to override
the session ID by specifying a "sessionId" field.  This functionality
was only used for in-app restart tests.  When Firefox restarts, the
Marionette session is arguably not the same, and sessions should not
live on between restarts.

This patch will fix capabilities passed from geckodriver and align the
Marionette Python client.

For backwards compatibility reasons, it needs to be possible to use the
Python client with older Firefoxen that reads cmd.parameters.capabilities
instead of cmd.parameters.  This is why we duplicate the capabilities
object, like geckodriver does.

MozReview-Commit-ID: DCpaxl9hOLe

--HG--
extra : rebase_source : 4464d9510ec8cc8a36a834d5b4b1178752dd488b
2017-08-08 17:37:41 +01:00
J. Ryan Stinnett
7d6a07aa90 Bug 1389153 - Skip more shadow DOM tests for Stylo. r=heycam
MozReview-Commit-ID: Arz7INgvzhH

--HG--
extra : rebase_source : 4b05b842aaad29fe9cad57f45be93db69ce1d1b7
2017-08-10 12:07:50 -05:00
Sebastian Hengst
dfdb63cdb8 Backed out changeset 69f808119fa3 (bug 1254136) for failing marionette-headless' test_cli_arguments.py TestCommandLineArguments.test_start_in_safe_mode on OS X and in marionette on Linux opt. r=backout 2017-08-11 09:06:41 +02:00
Henrik Skupin
f82940708a Bug 1388627 - close_chrome_window always operates in chrome context. r=automatedtester
MozReview-Commit-ID: J1R407tTuy4

--HG--
extra : rebase_source : bd508f1d3dcdfe08580e3dca4c4a64ac507efa92
2017-08-09 10:40:47 +02:00
Henrik Skupin
98282f804b Bug 1388627 - Remove obsolete Wait.until() calls from Window Manager Mixin. r=automatedtester
Given that both 'close' and 'close_chrome_window' wait for the underlying
tab or window to be closed, there is not need to explicitely wait in tests.

MozReview-Commit-ID: HOGgqzkNE9d

--HG--
extra : rebase_source : 0a1b197d499c9c2528e67e61172d90579f7ad696
2017-08-09 10:23:09 +02:00
Henrik Skupin
c77841c654 Bug 1254136 - Fix double registration for sessionstore-windows-restored. r=automatedtester
MozReview-Commit-ID: Dp6fncj463j

--HG--
extra : rebase_source : d69b5f5fc5f4e881c6d4b5e80576360078a59a0d
2017-08-10 18:04:47 +02:00
Ryan VanderMeulen
6eb7aef00e Merge m-c to autoland. a=merge 2017-08-09 18:51:26 -04:00
Henrik Skupin
e051e64a33 Bug 1386977 - Handle popstate events for page loads. r=automatedtester
In case of websites manipulating the browser's history via history.pushState
there will be no usual page load events fired. Instead listeners for popstate
events have to be used.

When such an event occurs we can directly return because the browser will
not load the underlying page. This only happens when navigating to another
page first, or restarting Firefox.

MozReview-Commit-ID: 3PceeYK9Co7

--HG--
extra : rebase_source : 30c162f72279712920a96ebc2076db27d01c41b6
2017-08-08 19:48:35 +02: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
dagasatvik
d4398e95f2 Bug 1385820 - Enable the ESLint no-new-wrappers rule across mozilla-central; r=markh,standard8
MozReview-Commit-ID: FvJO3ibeiwg

--HG--
extra : rebase_source : 5fc5c6760924da81a6d0708ff0d5586fc62c8c5e
2017-08-07 23:57:51 +05:30
Andreas Tolfsen
a791c795cb Bug 1387380 - Stop capabilities negotiation in Marionette. r=whimboo
The geckodriver HTTPD proxy implements WebDriver conforming capabilities
negotation and it is unnecessary to do this in the Marionette WebDriver
service.  The capabilities matching that Marionette implements is also
not as good as the implementation found in geckodriver.

The WebDriver:NewSession command will still accept a JSON Object of
"configuration" capabilities that carry the pre-matched capabilities from
geckodriver.  These will be used as configuration options for the session.
Type- and bounds checks will still be performed on this input.

MozReview-Commit-ID: CROjgGuTXOG

--HG--
extra : rebase_source : eb7e9f69fe3b23b77ea497d758fe30ac93d6373c
2017-08-04 20:04:12 +01:00
David Burns
74b035b657 Bug 1387644 - Return NoSuchElementError when element is not found r=ato
MozReview-Commit-ID: LDHiyce09GR

--HG--
extra : rebase_source : dff3b50237a3d124c0c41458c0adaf94694f45ef
2017-08-05 00:50:46 +01:00
Sebastian Hengst
b52285fffc merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: LBuvGxGDK9k
2017-08-06 11:05:44 +02:00
Masatoshi Kimura
8b713b2b0f Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC

--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
2017-08-04 17:49:22 +09:00
Andreas Tolfsen
da6629ba61 Bug 1387559 - Drop session_id fallback for WebDriver:NewSession. r=automatedtester
The WebDriver service in the remote protocol accepts sessionId and
session_id and we only need on.  All known consumers are using sessionId,
and we can drop the session_id fallback.

MozReview-Commit-ID: 6fa5Lgkzwfu
2017-08-05 17:35:54 +01:00
Andreas Tolfsen
5ec99cbafd Bug 1387457 - Convert element click functions to async. r=automatedtester
The element click functions in testing/marionette/interaction.js are
generator functions using "yield".  This patch converts them to async
functions.

MozReview-Commit-ID: 4A4cTaY619w
2017-08-05 17:21:06 +01:00
Phil Ringnalda
2685e4feb0 Backed out changeset 8bd84dfdba0d (bug 1387457) for eslint bustage
MozReview-Commit-ID: 4wgm2jnoDsl
2017-08-04 19:41:37 -07:00
Andreas Tolfsen
26e6ac4cfd Bug 1387461 - Add note to remove element.isVisible. r=automatedtester
DONTBUILD

MozReview-Commit-ID: AO8ikaX6RHB

--HG--
extra : rebase_source : d222314bc744df440594946f3b88435c5a89b17e
2017-08-04 15:51:19 +01:00
Andreas Tolfsen
2777c1c3a7 Bug 1387457 - Convert element click functions to async. r=automatedtester
The element click functions in testing/marionette/interaction.js are
generator functions using "yield".  This patch converts them to async
functions.

MozReview-Commit-ID: 4A4cTaY619w

--HG--
extra : rebase_source : 1b6f1b545f438ae253fd4024500bf41536d976aa
2017-08-04 15:45:02 +01:00
Andreas Tolfsen
895f6b68a5 Bug 1387447 - Update accessibility pointer-events expectations. r=yzen
With a WebDriver-conforming Element Click implementation, the element
click intercepted error is returned when an element with pointer-events:
"none" causes the click to hit the underlying element.

This patch does not functionally change anything yet about the
accessibility tests, but splits disabled_accessibility_elementIDs into
two lists, aria_disabled_elements and pointer_events_none_elements, in
anticipation of moving Marionette to use a different click implementation.

In the future, the ARIA tests will fail with "element not accessible"
errors as they do now, but the pointer-events tests will fail with
"element click intercepted" instead.

MozReview-Commit-ID: Ks1hyUVyLK7

--HG--
extra : rebase_source : 20dbcc228955626cd2d1617aa055f29f4e5928a4
2017-08-04 15:16:37 +01:00
Andreas Tolfsen
e6afed160b Bug 1381876 - Ensure Maximize Window is synchronous. r=automatedtester
Because the sizemodechange event is not synchronous on all platforms,
we additionally need to await the window's dimensions to change.

However, if the window manager does not have a notion of a maximised
state, this operation too could time out.  However, it is believed
that the additional wait will allow for the window to transition to the
required state in this scenario.

MozReview-Commit-ID: KeHJMKSJfjQ

--HG--
extra : rebase_source : 797b3be8f6adb027f15dd638f22afa6efd0f0432
2017-08-01 18:30:52 +01:00
Andreas Tolfsen
e611d3c375 Bug 1381876 - Introduce TimedPromise. r=automatedtester
This introduces a specialisation of the well-known Promise that can
time out after a set limit, causing the promises' "reject" callback to
be invoked.

The TimedPromise object represents the timed, eventual completion
(or failure) of an asynchronous operation, and its resulting value.
In contrast to a regular Promise, it times out after a set timeframe.

MozReview-Commit-ID: Rb3POsPYeT

--HG--
extra : rebase_source : cdff792dfa43af3cff1b20b3e81edb1a826e561e
2017-08-01 18:28:13 +01:00
Andreas Tolfsen
c956360dcb Bug 1381876 - Rename WaitCondition to Condition. r=automatedtester
The condition can be used for other things than poll-waiting.

MozReview-Commit-ID: 1sudv5JuEQT

--HG--
extra : rebase_source : ff58917f6fc0a860e149805ad838816541091705
2017-08-01 18:26:09 +01:00
Andreas Tolfsen
e6fdbe4caf Bug 1381876 - Compare window rect, not window size. r=automatedtester
The dictionary from Marionette#window_size is a subset of what is returned
from Marionette#window_rect, causing the self.assertEqual to complain
that they are not equal.  We want to compare the same types.

MozReview-Commit-ID: L4XTlgtUYKW

--HG--
extra : rebase_source : c3adf89777ac589cab2fb84fe3e543f22d9895fc
2017-08-01 18:21:04 +01:00
Andreas Tolfsen
107a4758fb Bug 1381876 - Remove unused import from test_window_maximize.py. r=automatedtester
MozReview-Commit-ID: 5C7ewMqY1iY

--HG--
extra : rebase_source : e545b6c24bd246e4d9554f35ede9ae7489cf6215
2017-08-01 18:19:58 +01:00
Andreas Tolfsen
acef2ddd2d Bug 1381876 - Fix window maximised assertions. r=automatedtester
The "delta" in the second assertion was not deducted from the height.
The patch also improves the error message.

MozReview-Commit-ID: 8u8UhKg3Q62

--HG--
extra : rebase_source : a3771620fc15225ac6932c718515b8dfcf2fdab0
2017-08-01 18:19:34 +01:00
Andreas Tolfsen
6e4c649956 Bug 1381876 - Include window state in window rect. r=automatedtester
The window state was included for only some of the commands' responses
earlier.

MozReview-Commit-ID: DdNyR7vdgtY

--HG--
extra : rebase_source : b7c3c7376f8affff673c903ba2c90e2cee93878a
2017-08-01 18:18:12 +01:00
Andreas Tolfsen
adf6b1ae3e Bug 1381876 - Return window rect from Context#rect consistently. r=automatedtester
MozReview-Commit-ID: D5pCPK2PEr3

--HG--
extra : rebase_source : a9e6c80314084a6b9fe3b4313d1599911528297b
2017-08-01 18:17:29 +01:00
Michael Smith
4bab91268e Bug 1373739 - Enable Marionette "screenshot" tests in headless. r=bdahl
These pass now (on my machine) after filling in look & feel values for headless
mode.

MozReview-Commit-ID: DpT74JbcMoF

--HG--
extra : rebase_source : b65dc65b23c6fc27d318c49a0a0349071125b104
2017-07-06 13:01:17 -07:00
Michael Smith
bd7674fb87 Bug 1373739 - Re-enable chrome-switching tests on headless mode. r=bdahl
MozReview-Commit-ID: He19Xcq88vo

--HG--
extra : rebase_source : 61327c45179765c9f7aa358d75d59108f49d9391
2017-06-27 16:42:41 -07:00
Andreas Tolfsen
9a2a6d153b Bug 1386581 - Imply --headless when MOZ_HEADLESS is set. r=automatedtester
When the MOZ_HEADLESS output variable is set in the environment,
--headless will be implied when using the Marionette harness.  This will
cause test rules and ignores to be picked up with MOZ_HEADLESS as they
are with --headless.

MozReview-Commit-ID: 8L7J4asQXyF

--HG--
extra : rebase_source : 0d4a41d028752c806fab94a5d0d0bb2802134b81
2017-08-02 12:05:09 +01:00
Rajesh Kathiriya
48e6bc2124 Bug 1374620 - Enabled the ESLint dot-notation rule across mozilla-central r=standard8
MozReview-Commit-ID: FadrI2li43G

--HG--
extra : rebase_source : b455e846ab79c8141150517e67e542e3e06d630e
2017-07-25 23:45:41 +05:30
Wes Kocher
b11975d1ad Merge m-c to autoland, a=merge
MozReview-Commit-ID: L5cEw8jWPNI
2017-07-31 17:53:14 -07:00
Andreas Tolfsen
38118e543e Bug 1385873 - <option> should not be deselected in dropdown. r=automatedtester
Marionette deselects <option>s if they are already selected in <select
multiple>, but it should not deselect them if they are in a dropdown
<select>.

MozReview-Commit-ID: 9CHfYrGn7xR

--HG--
extra : rebase_source : f2357c8b111a0296844b8eb594cfb13e8799c3a0
2017-07-31 14:08:41 +01:00
Andreas Tolfsen
30162bd0ea Bug 1385873 - Throw TypeError when passing XUL element to interaction.selectOption. r=automatedtester
Marionette throws a TypeError when the element is not an <option>,
and we should use the same error type when a XUL element is passed.

MozReview-Commit-ID: 3p3wPcW621f

--HG--
extra : rebase_source : dd5147d98ce68e664d0782949a760f499f3fe24a
2017-07-31 14:06:07 +01:00
Andreas Tolfsen
ec081889ac Bug 1385873 - Better error on wrong element to interaction.selectOption. r=automatedtester
Throw a better error message when the wrong element type is passed to
interaction.selectOption.

MozReview-Commit-ID: G1NIZ25umm2

--HG--
extra : rebase_source : 55389d965c253dc3f1718e627f5c3a0c4f16fb84
2017-07-31 14:04:50 +01:00
Andreas Tolfsen
d29f92675d Bug 1385547 - Lint testing/marionette. r=automatedtester
Automatic fixes from './mach lint --fix testing/marionette'.

MozReview-Commit-ID: 4UOLrLLxMbH
2017-07-31 16:01:12 +01:00
Andreas Tolfsen
cf3f40c311 Bug 1385547 - Tighten eslint rules on semicolons and init to undefined. r=automatedtester
Under testing/marionette, we always use semicolons for consistency and we
never initialise scoped variables to undefined becuase it is the default
value.  We also indent continued call expressions by four characters.

Disallowed:

	let foo = undefined;
	return foo

Allowed:

	const foo = undefined;
	let bar;
	return bar;

MozReview-Commit-ID: LgVPMqnFqNk
2017-07-31 16:01:12 +01:00
Marco Castelluccio
ad13ad3d56 Bug 1357517 - Fix max-len eslint rule breakage in marionette.js. r=me 2017-07-30 21:12:36 +02:00
Marco Castelluccio
538f029e0c Bug 1357517 - Remove or delay Preferences.jsm usage from Marionette. r=ato
--HG--
extra : rebase_source : 483c64a39129b85c2533c45a8fefd5d54238773c
2017-07-30 20:05:22 +02:00