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

651 Коммитов

Автор SHA1 Сообщение Дата
Ian MacLeod dbb37eec2c Bug 1389488 - Check that add-on file exists before forwarding request to AddonManager r=whimboo
MozReview-Commit-ID: 6b6QS9y6vPj

--HG--
extra : rebase_source : c4d2174ba11ddcc5076152982b761bb02ee94d65
2017-09-24 02:08:44 -07:00
Wes Kocher 519bb0922b Merge inbound to central, a=merge
MozReview-Commit-ID: EK8iFR1hSRp
2017-09-18 16:21:01 -07:00
Henrik Skupin 6d45bcb001 Bug 1397612 - Skip TestQuitRestart.test_in_app_restart_safe_mode due to hangs after restart.
MozReview-Commit-ID: 1CvdUz7Uti0
2017-09-18 13:39:03 -07:00
Henrik Skupin 61d1233ce1 Bug 1400594 - Further reduce start_timeout for test_startup_timeout. r=maja_zf
On Windows TaskCluster workers Marionette could be ready within 1s.
As such the currently used timeout is too long, and needs to be
further reduced.

MozReview-Commit-ID: KbLVdpB71cu

--HG--
extra : rebase_source : 2b9139e4b7e2c9d5815e7cc481086ca779385538
2017-09-18 10:30:57 +02:00
Henrik Skupin 38ed548903 Bug 1397675 - Immediately kill the process if no connection can be made after startup. r=maja_zf
When the binary gets launched we do not immediately kill the process if the
connection to Marionette server cannot be established within the given amount
of seconds. Instead "_handle_socket_failure" is getting called because
the utility method `raise_for_port` inappropriately uses the `@do_process_check`
decorator.

By removing the decorator the initial connection attempt can be handled
differently. As such the process if handled by Marionette will be immediately
killed. Currently we are waiting for the process to quit itself within 120s,
which will actually never happen due to no active session.

Further `start_session` defaults to a timeout of 60s which itself is problematic
for test harnesses using Marionette but controlling the binary themselves. In
those cases timeouts can happen often for slow starting browser processes like
debug builds. Instead this timeout should default to the `startup_timeout` value.

MozReview-Commit-ID: BZvX5KT45mK

--HG--
extra : rebase_source : 875807b75f0575a10dc9de3588237002fa6a5821
2017-09-07 15:40:19 +02:00
Andreas Tolfsen b803b6e1dc Bug 1399076 - Error when weakref of web element is destroyed. r=automatedtester
Take into account that a weak referenced element might have been destroyed
in the element staleness check.

An error is thrown when the reference object has been destroyed when
getting a weakrefs' pointer.  We catch this, but element.isStale does
not take into account that the el argument in this case can be null,
or in this revision of the patch, undefined.

MozReview-Commit-ID: 7sr4YGhAotS

--HG--
extra : rebase_source : 995eeef4ec1b19bf100cb95c4dd343e947b1cf52
2017-09-12 13:18:52 +01:00
Kris Maglione 8c91f29845 Bug 1398499: Part 3 - Add Marionette tests for global sharing. r=mccr8
This tests both that the settings have the desired effect and that switching
between sharing enabled and sharing disabled without a startup cache flush
does not cause any issues.

Tests for user pref changes are currently non-fatal, since they're known not
to work reliably.

MozReview-Commit-ID: 1ZFwyiNf3da

--HG--
extra : rebase_source : c38bd92d2137c90f8c4d202b7009612b45ff4be9
2017-09-09 17:33:01 -07:00
Henrik Skupin 54ec2c0bf0 Bug 1397734 - Centralize defaults for socket and startup timeouts r=maja_zf
Currently defaults for startup_timeout and socket_timeout are defined
at two different places (Marionette driver and harness). As of now it's
even the case that startup_timeout has different values. While Marionette
driver uses 120s, the harness only uses 60s.

As result all jobs which are based on the Marionette harness fail if
Firefox starts-up slowly like for debug builds.

MozReview-Commit-ID: Dl4sBG1H7NA

--HG--
extra : rebase_source : 959facabebc371beee23b4de345ddd2495913bb7
2017-09-07 15:36:50 +02:00
Sebastian Hengst ca5bb38a4c Backed out changeset bc05e6c94a17 (bug 1397734) for mass mochitest failures (passed str to timedelta). r=backout on a CLOSED TREE 2017-09-08 09:30:48 +02:00
Henrik Skupin 67e8ef4b57 Bug 1397734 - Centralize defaults for socket and startup timeouts r=maja_zf
Currently defaults for startup_timeout and socket_timeout are defined
at two different places (Marionette driver and harness). As of now it's
even the case that startup_timeout has different values. While Marionette
driver uses 120s, the harness only uses 60s.

As result all jobs which are based on the Marionette harness fail if
Firefox starts-up slowly like for debug builds.

MozReview-Commit-ID: Dl4sBG1H7NA

--HG--
extra : rebase_source : 688338b1782deaf08eb01c7c5d4ca01ba03328f5
2017-09-07 15:36:50 +02:00
Henrik Skupin 8ea68cdf34 Bug 1331313 - Let add-on install() / uninstall() wait for the expected add-on. r=ato
Currently the listener for addon installs misses a check for the addon id,
to only resolve the promise when it has been called for the expected  addon.
This can cause race-conditions if other addons are getting installed at the
same time.

The same applies to uninstall which doesn't wait at all until the operation
has been completed.

MozReview-Commit-ID: 5GsomMoAVZ1

--HG--
extra : rebase_source : a1b43adb2239b0c28cbee1d843f4b6c666a07f0a
2017-08-23 15:53:45 +02:00
Henrik Skupin 269febe5eb Bug 1387470 - Use moz:webdriverClick capability for spec conforming element click. r=ato
To allow geckodriver to temporarily opt-in for using the webdriver
conforming click, a new custom capability has to be created for
Marionette. If not specified the legacy clickElement method will
be used instead.

MozReview-Commit-ID: LuyTjLJXMGL

--HG--
extra : rebase_source : 8e133fb2d9767ea580468013fedff5233fd8eb93
2017-09-01 17:11:35 +02:00
Henrik Skupin 476c801003 Bug 1387094 - Add noProxy support for manual proxy type. r=ato
MozReview-Commit-ID: 1C9sFgrno4i

--HG--
extra : rebase_source : 4182535b4dc5660966856adc250e38c08e009623
2017-08-31 17:49:36 +02:00
Andrew Halberstadt f79b06a32a Bug 1339178 - Use pytest to run python-tests, r=davehunt
This switches most tests over to use pytest as the runner instead of unittest (taking
advantage of the fact that pytest can run unittest based tests).

There were a couple tests that had failures when swithing to pytest:
config/tests/unit-expandlibs.py
xpcom/idl-parser/xpidl/runtests.py

For these tests, I added a runwith='unittest' argument so that they still run the
same way as before. Once we fix them to use pytest, the unittest logic in mozunit.py
can be deleted.

MozReview-Commit-ID: Gcsz6z8MeOi

--HG--
extra : rebase_source : 3c762422ce0af54cbbe7d9fc20085a2d1ebe7057
2017-08-29 14:50:33 -04:00
Henrik Skupin 636959a3aa Bug 1369827 - Fix socksVersion key in proxy capabilities. r=ato
In the spec the socksProxyVersion key has been renamed to
socksVersion. Marionette has to be adjusted for this change.

MozReview-Commit-ID: Ep3zNZLKxXl

--HG--
extra : rebase_source : f29f45c9d30fa5f208b595f2e90f544ab652c8cc
2017-08-23 11:47:01 +02:00
Henrik Skupin 8c9c9c7b11 Bug 1369827 - Make proxy port an optional suffix for the host. r=ato
The WebDriver spec has been changed a while ago in regard of how
proxy capabilities are getting specified. It means that the port
is no longer its own key but an optional suffix for each of the
ftpProxy, httpProxy, sslProxy, and socksProxy keys.

MozReview-Commit-ID: zdYnVZSf09

--HG--
extra : rebase_source : c4928e6170b52a0ee247f50861646ec29a56bd34
2017-08-18 14:49:00 +02:00
Andrew Halberstadt 2255a9eed7 Bug 1395126 - Support cascading configuration for flake8, r=bc
This allows .flake8 files to override one another, and fixes a pretty bad known
bug with our flake8 implementation. For example, say we have a .flake8 file at:
/foo/.flake8

Before this patch, if we ran |mach lint foo/bar|, the configuration defined in
that .flake8 file wouldn't get picked up. It would only work if running the
specific directory that contains it, e.g |mach lint foo|.

This change additionally allows multiple .flake8 files to be used. So if
there's one defined at both:
/.flake8
/foo/.flake8

Then running |mach lint foo/bar| will first apply the root .flake8, then the
one under /foo (overriding earlier configuration).

This bug still doesn't make flake8 configuration perfect though. Any directory
containing a .flake8 file still needs to be explicitly listed in the "include"
section of /tools/lint/flake8.yml. Otherwise in the example above, if running
|mach lint /|, it wouldn't be able to find /foo/.flake8. This is a hard problem
and is likely best solved by fixing flake8's upstream configuration handling.

Unfortunately this means we still can't switch from a whitelist to a blacklist.

MozReview-Commit-ID: 3DZAi1QHYYo

--HG--
extra : rebase_source : 51298c5847f6c2792581d9b312c87b70fa716ee1
2017-08-29 17:32:31 -04:00
Henrik Skupin e5ebb0b363 Bug 1387678 - Skip all tests in test_shadow_dom.py due to intermittent failures. r=jmaher
MozReview-Commit-ID: KVJMcZWEW8p

--HG--
extra : rebase_source : f21ba7056d0cf3e557e6a2a00acf12d4dcf6e3ab
2017-08-28 16:46:37 +02:00
Dão Gottwald 10caf949d2 Bug 1390359 - Replace faded out (i) icon with a search icon when the location bar is empty or modified. r=adw
MozReview-Commit-ID: 8Q6MeB1XuyD

--HG--
extra : rebase_source : 5152c5077e951afad4932b938e4022c3704d2a05
2017-08-24 09:30:39 +02:00
Wes Kocher e3d5db5c9a Backed out changeset df24976c2a46 (bug 1390359) for test_chrome_element_css.py failures a=backout
MozReview-Commit-ID: I0zHTpanBS0
2017-08-24 00:13:25 -07:00
Dão Gottwald 3e3744e717 Bug 1390359 - Replace faded out (i) icon with a search icon when the location bar is empty or modified. r=adw
MozReview-Commit-ID: BQJ8ZiFAzco

--HG--
extra : rebase_source : f42aa26361094f6b072975a7bd86f10b9960e7c6
2017-08-23 09:41:48 +02:00
Andreas Tolfsen b65f30cdab Bug 1393097 - Relicense test_execute_async_script.py to public domain. r=automatedtester
DONTBUILD

MozReview-Commit-ID: AMrcfZyfEQM

--HG--
extra : rebase_source : 5632343813bb45edab99e30d8aba32ef48a34bda
2017-08-23 17:12:11 +01:00
Andreas Tolfsen 3f7148fec0 Bug 1393094 - Relicense test_execute_script.py to public domain. r=automatedtester
DONTBUILD

MozReview-Commit-ID: 2195jqRYoQN

--HG--
extra : rebase_source : f214dfac96a7d40d38e2e21823aa3fe7afaaa14b
2017-08-23 17:08:14 +01:00
Andreas Tolfsen 657e3f287d Bug 1391691 - Make WebDriver:FullscreenWindow idempotent. r=automatedtester
MozReview-Commit-ID: 4AQlYYNV03f

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

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

--HG--
extra : rebase_source : ced1fb5e6add0b2688c3e6cc0740eb9a9e54456a
2017-08-18 18:30:50 +01:00
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
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
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 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
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
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
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 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
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
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