Commit Graph

2862 Commits

Author SHA1 Message Date
Wes Kocher
75e9f7dbef Backed out 10 changesets (bug 1391691) for wpt failures a=backout
Backed out changeset 666ac679317e (bug 1391691)
Backed out changeset 46f82e1e2cde (bug 1391691)
Backed out changeset 1fd98ace1473 (bug 1391691)
Backed out changeset 5bddbd90ec7c (bug 1391691)
Backed out changeset 4653134d01ef (bug 1391691)
Backed out changeset fd88b612ac2e (bug 1391691)
Backed out changeset 6306abc0b5e9 (bug 1391691)
Backed out changeset 649b0e761c87 (bug 1391691)
Backed out changeset 6c48daaad075 (bug 1391691)
Backed out changeset 17aeed1f6454 (bug 1391691)

MozReview-Commit-ID: 6Cw1QibNQKM

--HG--
extra : rebase_source : 0197f824719f11e113595dd9a4a86b2c8d1fd8fe
2017-08-21 09:19:10 -07:00
Andreas Tolfsen
ab34c37f43 Bug 1391691 - Make WebDriver:FullscreenWindow idempotent. r=automatedtester
MozReview-Commit-ID: 4AQlYYNV03f

--HG--
extra : rebase_source : ab85f647405a23d249c3c79413382004b9d5ba90
2017-08-18 18:32:11 +01:00
Andreas Tolfsen
fd1746e875 Bug 1391691 - Make WebDriver:MaximizeWindow idempotent. r=automatedtester
MozReview-Commit-ID: EJ0VQOTWysg

--HG--
extra : rebase_source : 8fa9ab528c30f11d791b0e49f36661957f19befa
2017-08-18 18:31:42 +01:00
Andreas Tolfsen
9e4a620575 Bug 1391691 - Make WebDriver:MinimizeWindow idempotent. r=automatedtester
MozReview-Commit-ID: 4XBw0UFfZ1O

--HG--
extra : rebase_source : c2de251b5e994710ae197e63b7413a321f490900
2017-08-18 18:30:50 +01:00
Andreas Tolfsen
017325b653 Bug 1391691 - Rename GeckoDriver#fullscreen to fullscreenWindow. r=automatedtester
The other window state manipulation commands are named minimizeWindow
and maximizeWindow.

MozReview-Commit-ID: IBVqJSRwG8x

--HG--
extra : rebase_source : 29271a475a847ca15c1d8f736520b238c0818791
2017-08-18 18:29:47 +01:00
Andreas Tolfsen
14a5d8a735 Bug 1391691 - Export WindowState properly. r=automatedtester
MozReview-Commit-ID: CNev3JIWJAt

--HG--
extra : rebase_source : 80177d33da8a1f0b75227a3bb22e9c81652c0520
2017-08-21 14:08:44 +01:00
Andreas Tolfsen
5906316d3c Bug 1388036 - Restore window when setting window rect. r=automatedtester
If the window is minimized when setting the window rect, restore it
before resizing or moving the window.  We already exit fullscreen,
so this brings parity to the WebDriver:SetWindowRect command.

MozReview-Commit-ID: KrvWJjKX1eA

--HG--
extra : rebase_source : 968317ae961c8292edbadf2b4cfe439b7dc11f56
2017-08-18 16:01:24 +01:00
Andreas Tolfsen
cfe89162b6 Bug 1391952 - Introduce camel case lint rule. r=automatedtester
The Firefox remote protocol in testing/marionette predominantly uses
camel casing in naming properties and variables.  To enforce consistency
with this practice, this patch adds an eslint rule to enforce camel case.

There are a few exceptions where we use snake case in response output.
We can disable the lint rule on an individual basis in this handful
of cases.

MozReview-Commit-ID: DL7msdriFil

--HG--
extra : rebase_source : 737791b59002027f7501e7c46bd31d7a368a9b66
2017-08-19 14:18:51 +01:00
Andreas Tolfsen
c44c39fe1c Bug 1391952 - Disable camel case lint for input and output. r=automatedtester
MozReview-Commit-ID: 5KargkSvSPn

--HG--
extra : rebase_source : 45974434b348aed13a50fe4c98f11fc39217723c
2017-08-19 14:21:43 +01:00
Andreas Tolfsen
6c36c123e0 Bug 1391952 - Lint testing/marionette. r=automatedtester
MozReview-Commit-ID: CdA2gkIaul7

--HG--
extra : rebase_source : a3c4b785da01c19d8ef41cb3628a4844ec518ca2
2017-08-19 14:22:17 +01:00
Andreas Tolfsen
802a866314 Bug 1391699 - Disallow fallthrough case statements. r=automatedtester
We recently had a serious bug in Marionette (https://bugzil.la/1254136)
due to a case statement that fell through due to a missing "break"
statement.  This patch introduces a lint rule to prevent similar episodes
in the future.

When you do want a case to fall through, it is possible to add a comment
like this:

	switch (foo) {
	  case 1:
	    doSomething();
	    // fall through

	  case 2:
	    doSomething();
	    break;
	}

MozReview-Commit-ID: Gu8cFGsdne2

--HG--
extra : rebase_source : 8b29c663167783770d0eb0a32b7a7c2cb83a529e
2017-08-18 18:55:56 +01:00
Henrik Skupin
f901b6658a Bug 1254136 - Fix double registration for sessionstore-windows-restored. r=automatedtester
A missing break statement caused a double execution of the code in
"profile-after-change", which leads to two instantiations of the
Marionette server colliding due to the same port.

MozReview-Commit-ID: Dp6fncj463j

--HG--
extra : rebase_source : dd4301c2fb797da228c0011e6bd90afa9171fb54
2017-08-10 18:04:47 +02:00
Henrik Skupin
f5ae03f271 Bug 1391016 - "proxyAutoconfigUrl" is required for proxyType "pac". r=automatedtester
MozReview-Commit-ID: DC43PmCAWBn

--HG--
extra : rebase_source : 910653f16a44f934dddbb9a00d1d66bf496ee1fe
2017-08-16 21:58:55 +02:00
Henrik Skupin
1342b7079f Bug 1391016 - Make sure that proxyType is required and a string. r=automatedtester
The webdriver spec declares the "proxyType" as required, and of
type string.

MozReview-Commit-ID: FXUhdYfOwWI

--HG--
extra : rebase_source : dc069a4de1e014951ed430bf5448ca0e3ac2545e
2017-08-16 21:45:09 +02:00
Andreas Tolfsen
4c0b8e5e9b Bug 1390595 - Exit with jsdoc return code from "mach marionette doc". r=whimboo
The "mach marionette doc" command to generate Marionette server API
documentation should exit with jsdoc's return code so the caller can
determine whether the operation was successful.

MozReview-Commit-ID: BXqGQlN5WPN

--HG--
extra : rebase_source : d7a45f321fe7f7c455d905b6cb90549872f2059d
2017-08-15 20:00:42 +01:00
Wes Kocher
7921644d1b Merge inbound to central, a=merge
MozReview-Commit-ID: 1DadhJTLBXN
2017-08-15 19:02:51 -07:00
Andreas Tolfsen
6358549fc7 No bug: Generate Marionette API docs. r=me
MozReview-Commit-ID: L9YAB4WCZmu
2017-08-15 19:56:04 +01:00
Henrik Skupin
654b88a12d Bug 1387092 - Add support for proxyType "direct". r=ato
The webdriver spec has been updated a while ago and renamed the proxyType
for not using a proxy from "noProxy" to "direct".

MozReview-Commit-ID: FjDIK8XCba8

--HG--
extra : rebase_source : 423149d3f82cf1b7e28d29a775359ac66e7a6f90
2017-08-15 19:23:33 +02:00
Sebastian Hengst
b07f79e076 Backed out changeset 30805fec70ed (bug 1387092) for failing testing/marionette/test_session.js | test_Proxy_init. r=backout 2017-08-15 19:08:53 +02:00
Henrik Skupin
e33bba5063 Bug 1390486 - Add "dom.file.createInChild" preference to recommended prefs. r=ato
To allow geckodriver to create file objects in child processes, this
preference has to be set to true. As such it needs to be recommended
in Marionette and set as default preference for geckodriver.

MozReview-Commit-ID: 8bdbi5jH6Vc

--HG--
extra : rebase_source : cc8963d2b15357b6d1607854e978aa764fcbd42f
2017-08-15 17:47:15 +02:00
Henrik Skupin
57339723eb Bug 1387092 - Add support for proxyType "direct". r=ato
The webdriver spec has been updated a while ago and renamed the proxyType
for not using a proxy from "noProxy" to "direct".

MozReview-Commit-ID: FjDIK8XCba8

--HG--
extra : rebase_source : ab41d737c9ba06c8883bfd36839807e6c3316c92
2017-08-11 11:55:51 +02:00
Andreas Tolfsen
7cf5d04a5e Bug 1388082 - Drop Task.jsm from Marionette. r=automatedtester
MozReview-Commit-ID: HbEHjOv1W3g

--HG--
extra : rebase_source : 8eb72aed9138dcfbe2fbe9d15e9a286944ae64a3
2017-08-07 19:02:20 +01:00
Andreas Tolfsen
a388449f1f Bug 1388082 - Remove unused import. r=automatedtester
MozReview-Commit-ID: 1W6eI99Ze40

--HG--
extra : rebase_source : 277fe9280e71db8afff5ad3a588e2155d589adf8
2017-08-07 19:01:20 +01:00
Andreas Tolfsen
b5560cd3ea Bug 1388082 - Convert content script to async/await. r=automatedtester
MozReview-Commit-ID: GHyhwa91L73

--HG--
extra : rebase_source : 9c82555641ca4ee3e496d35fd76fa24d7ba60e37
2017-08-07 18:59:45 +01:00
Andreas Tolfsen
2075d0f6df Bug 1388082 - Use async/await in wait module xpcshell tests. r=automatedtester
MozReview-Commit-ID: C0C0GBS9fWr

--HG--
extra : rebase_source : 1a62a0cca34afbe7aca970e5ee0f5281d8939a56
2017-08-07 18:58:09 +01:00
Andreas Tolfsen
e13cd58584 Bug 1388082 - Use async/await in reftest module. r=automatedtester
MozReview-Commit-ID: 9sUL77lPCK1

--HG--
extra : rebase_source : 4388640825b40e8cb93216d1f1323ebabd474c16
2017-08-07 18:57:37 +01:00
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