Commit Graph

2935 Commits

Author SHA1 Message Date
Ian MacLeod
596a2c319b Bug 1368034 - Update default values for urlbar searches in Marionette r=whimboo
Search suggestions create unneccessary network requests and the suggestions
opt-in notification interferes with tests that don't expect it to be there.
So, this patch updates the default settings in Marionette to disable both.

MozReview-Commit-ID: 8X8SYPq19tj

--HG--
extra : rebase_source : cd0fe8f3437340b1266d161e1cad46bcbcd1a6f6
2017-09-25 02:10:47 -07:00
Vedant Chakravadhanula
f0c4e7a6c8 Bug 1364349 - Removed platform property of Firefox Puppeteer. r=whimboo
The wrapper puppeteer.platform in Firefox UI test was deemed redundant.

MozReview-Commit-ID: LUocC59bLNF

--HG--
extra : rebase_source : e764ba1d09d3f752e75ec6aed80ca93781c319dc
2017-09-25 14:30:11 +05:30
James Graham
ad38a14c75 Bug 1393366 - Increase the marionette connect timeout in wptrunner, r=maja_zf
This switches to using a timeout of 120s * timeout_multplier, which is
twice the current value. The Marionette startup_timout value is
removed because it turns out that's only used when marionette starts
the Firefox instance and therefore is ignored in this case.

MozReview-Commit-ID: 4VA8yB6M1d5

--HG--
extra : rebase_source : ba9d506d4061d49f2a95fbb24e690841fc902c97
2017-09-21 17:56:43 +01:00
Andreas Tolfsen
e3681ac449 Bug 1400226 - Wait for visibilitychange event on window minimize/restore. r=whimboo
The sizemodechange event is not strongly connected to the
visibilitychange event that the WPT minimize_window.py test is now
using to ascertain whether the window has been successfully iconified.

Because Marionette uses the sizemodechange event it is causing
intermittents such as https://bugzil.la/1397007.  You can also read a
lengthy summary I did on the problem in https://bugzil.la/1397007#c11.

The fix for the problem is to wait for the visibilitychange DOM
event content.

MozReview-Commit-ID: B6i33Ee5iMC
2017-09-21 15:02:36 +01:00
Andreas Tolfsen
9ac995ab12 Bug 1400225 - Subscribe to and relay web content DOM events. r=automatedtester,whimboo
This makes it possible to subscribe to DOM events in web content, in
order to facilitate fixes for cases such as https://bugzil.la/1397007.

Although the current interface, WebElementEventTarget, is associated with
browser.Context (curBrowser) it is the intention that we in the future
will associate this with representations of the marshaled web element.
This will make it quack and act like an Element's EventTarget, which
has nice parity to it.

The WebElementEventTarget works by passing IPC messages to
a backend service in the content frame script implemented by
ContentEventObserverService.  This registers event handlers for specific
DOM events, and relays these events back to the browser-specific message
handler in chrome.

This will enable chrome code to wait for events to occur in content,
like this:

	await new Promise(resolve => {
	  webElement.addEventListener("visibilitychange", resolve, {once: true});
	  contentBrowser.minimize();
	});

MozReview-Commit-ID: B8MMHyG8n04

--HG--
extra : rebase_source : 25ac77fbcfb09435325719ac61614c4a8ce37996
2017-09-15 17:07:41 +01: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
Andreas Tolfsen
4491a3016a No bug: Generate Marionette API docs. r=me NPOTB
MozReview-Commit-ID: IjfiYEDpmEh
2017-09-16 09:58:47 +01: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
890c883dee Bug 1399628 - Disable Shield extension in Marionette and geckodriver. r=ato
Shield experiments interfer with core features of Firefox which can
cause tests run via Marionette or geckodriver to fail. Resetting the
API URL will make sure that no experiments can be downloaded.

MozReview-Commit-ID: HnE49jfnen7

--HG--
extra : rebase_source : 2fa6cf86ddce798eba88a41d227768f149cccc70
2017-09-14 21:03:40 +02:00
Sebastian Hengst
80dfe00824 Backed out changeset 3baecf7b25f2 (bug 1399628) for build bustage. r=backout 2017-09-15 14:36:12 +02:00
Henrik Skupin
b2ac5a3fe1 Bug 1399628 - Disable Shield extension in Marionette and geckodriver. r=ato
Shield experiments interfer with core features of Firefox which can
cause tests run via Marionette or geckodriver to fail. Resetting the
API URL will make sure that no experiments can be downloaded.

MozReview-Commit-ID: HnE49jfnen7

--HG--
extra : rebase_source : 9cec29085032318e9e8467d6d754afe0890ae645
2017-09-14 21:03:40 +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
Sebastian Hengst
7dd2b068b5 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-09-13 13:35:21 +02:00
Andreas Tolfsen
d228da0fa7 No bug: Generate Marionette API docs. r=me
MozReview-Commit-ID: IGfMtLgswlY
2017-09-13 11:52:44 +01: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
Andreas Tolfsen
bbf5d23b36 Bug 1396866 - Restore window state on maximizing, minimizing, and fullscreening. r=automatedtester
When maximizing the window we must restore it from iconified state or
exit fullscreen first.  Likewise for minimizing the window, we must
exit fullscreen.  For fullscreening the window we need to also restore
the window.

MozReview-Commit-ID: AOQX2cV2C75

--HG--
extra : rebase_source : 53f310cc261a9a411bc46a04dd50a160a930b5af
2017-09-09 12:20:40 +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
03ba8ad526 Bug 1397306 - Empty noProxy list should reset no proxy exclusions. r=ato
To allow resetting the default no proxy exclusion entries in
Firefox tests have to pass an empty noProxy list. This should
also be correctly applied.

MozReview-Commit-ID: ABmYdPvoSvx

--HG--
extra : rebase_source : 313fe0a918a4a9bfe5204e5777568ee5f89744d3
2017-09-07 10:21:36 +02:00
Sebastian Hengst
1c4ad71269 Backed out changeset 1e12a866239c (bug 1394381) for busting web-platform-tests. r=backout on a CLOSED TREE 2017-09-06 18:51:32 +02:00
Andreas Tolfsen
8a7c17f04e Bug 1396618 - Throttle window minimize and restore r=automatedtester
MozReview-Commit-ID: 5LUWYwURQgs

--HG--
extra : rebase_source : fcc47b5994b356fad670cc56cc03f0976338a950
2017-09-04 16:55:34 +01:00
Henrik Skupin
c22e1e2d16 Bug 1394381 - Add logging output for Marionette connection attempts. r=maja_zf
If Marionette client cannot connect to the server, the attempts
have to be logged to stderr. This allows us to inspect the reason
why a connection from the client could not be made, and that it
still tries to connect (see bug 1362293).

MozReview-Commit-ID: ElE1M73ums8

--HG--
extra : rebase_source : e64a549e98b0adc4e7ea410f0d2fd500e0d55f87
2017-08-28 17:46:06 +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
Sebastian Hengst
45cb996f32 merge mozilla-central to autoland. r=merge a=merge 2017-09-05 12:37:56 +02:00
Steve Armand
e46ff00709 Bug 1368967 - Enable the ESLint generator-star-spacing rule across mozilla-central. r=standard8
MozReview-Commit-ID: 5do3eoCEAMR

--HG--
extra : rebase_source : 5f692e474e1d7d173fcb4c9c08617f0fe489e443
2017-09-04 00:49:32 -04:00
Andreas Tolfsen
2c9fa2e359 No bug: Generate Marionette API docs. r=me
DONTBUILD

MozReview-Commit-ID: LSonzfgaZ6n
2017-09-04 15:32:15 +01:00
Andreas Tolfsen
35190fd47d No bug: Fix Marionette jsdoc errors. r=me
DONTBUILD

MozReview-Commit-ID: HvhpWSOwM0n
2017-09-04 15:32:08 +01:00
Sebastian Hengst
43bc951ac7 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: ES9rKhiQo10
2017-09-01 10:38:51 +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
Wes Kocher
6472928439 Merge m-c to inbound, a=merge
MozReview-Commit-ID: 77Uz3uceUmk
2017-08-31 16:56:23 -07:00
Andreas Tolfsen
8e318ae1c0 Bug 1395469 - Check discarded ChromeWindow in staleness test. r=me
HTML elements' ownerGlobal is a WindowProxy that indirects operations
to the current browsing context.  However, for XUL elements this global
is ChromeWindow which gets reset to null when the window is discarded.

For the same reason, since win indirects to the current browsing context's
associated window, we need to test that the element's node document is
not the active document.

Finally test that its shadow-including root is a document.

MozReview-Commit-ID: EYh18P8DbcN
2017-08-31 17:36:27 +01:00
Andreas Tolfsen
482df6f9bf Bug 1394849 - Add error.stack to create stacktraces. r=automatedtester
This patch introduces a new error.stack function as a shorthand for
creating stacktraces.  It is equivalent to calling

	new Error().stack

and removing the first line of the stack.  Removing the first line is
needed to make it appear as if the error originated from the caller's
position in the program.

MozReview-Commit-ID: DpSSWU5vPDm

--HG--
extra : rebase_source : 52697e348367b2b7dbeb28a711a9bd1fdef076ec
2017-08-29 17:34:37 +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
3e05362c6a Bug 1395176 - Add eslint rule that forbids use of var. r=automatedtester
MozReview-Commit-ID: GvuSbH6EHea

--HG--
extra : rebase_source : 4093bf49449a6537ed0b428d93767bf6906ba8ee
2017-08-30 17:36:56 +01:00
Andreas Tolfsen
aeb61b530d Bug 1395176 - Lint testing/marionette for var usage. r=automatedtester
MozReview-Commit-ID: FCcyuUVJC7J

--HG--
extra : rebase_source : b6f16c2b2118aff532dd7480304bcd94aa739148
2017-08-30 17:38:23 +01:00
Andreas Tolfsen
0738b2f5fb Bug 1395176 - Turn marshal helper into function. r=automatedtester
MozReview-Commit-ID: 16azA4HnEg6

--HG--
extra : rebase_source : bcfab3f33714a7c0bf3e63dd84ea101fb560a2b7
2017-08-30 17:38:10 +01:00
Andreas Tolfsen
428df6da9e Bug 1395176 - Use scoped remoteFrames instead of global. r=automatedtester
MozReview-Commit-ID: 5Kj78w2gDvx

--HG--
extra : rebase_source : 0a47bbb4309a6cd2598bc77251575ef32d9cd7ce
2017-08-30 17:37:33 +01: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
Sebastian Hengst
a56d428b1f merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: Gf0QPFp52Bj
2017-08-30 11:05:16 +02:00
Andreas Tolfsen
6a8d4baed7 Bug 1393812 - Fix call to element.isDisconnected. r=automatedtester
A fallout from https://bugzil.la/1392346 was that element.isStale called
element.isDisconnected incorrectly by using the old container object.
This was reported in https://bugzil.la/1392854.

Since we in the long term want to get rid of the concept
of window/shadow root containers (in preparation for
https://bugzil.la/marionette-window-tracking), we might as well fix
the fallout by making element.isDisconnected take separate window-
and shadowRoot arguments, like element.isStale.

Fixes: https://bugzil.la/1392854
MozReview-Commit-ID: ELIu8HsZUfK

--HG--
extra : rebase_source : 3f0cc83048d9f069c47c08c0a6d886033c106825
2017-08-25 16:30:08 +01:00
Ganti Sai Sarath Chandra
6ed789d12b Bug 1378422 - Add python 2 only classifiers to python modules under /testing, r=ahal
MozReview-Commit-ID: DRi8KFyCnBn

--HG--
extra : rebase_source : 3ac98bdc648f8a0e3dc6d3b6d42e19dfc295a396
2017-08-19 04:19:06 +05:30
Henrik Skupin
c80a4170d0 Bug 1394377 - Increase default shutdown timeout to 120s. r=maja_zf
The background thread hang monitor will crash Firefox after 60s if
a shutdown is too slow. Debug builds are slower and as such Marionette
would force kill Firefox right before the hang monitor can kick in.

MozReview-Commit-ID: GGQFPEZ37dg

--HG--
extra : rebase_source : 99223b83c60be1abad1cc23d8a7c9c31a9f39379
2017-08-28 17:35:39 +02: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