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

3714 Коммитов

Автор SHA1 Сообщение Дата
Timothy Guan-tin Chien 2b5881e46b Bug 1503019 - Part I, Remove dom.webcomponents.shadowdom.enabled r=smaug
This patch removes the dom.webcomponents.shadowdom.enabled pref and all its
references, including the following functions:

* nsContentUtils::IsShadowDOMEnabled()
* nsIDocument::IsShadowDOMEnabled()
* nsDocument::IsShadowDOMEnabled(JSContext* aCx, JSObject* aGlobal)
* nsDocument::IsShadowDOMEnabled(const nsINode* aNode)
* nsTextNode::IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject)

This function is renamed and updated to nsDocument::IsCallerChromeOrAddon():

* nsDocument::IsShadowDOMEnabledAndCallerIsChromeOrAddon(JSContext* aCx, JSObject* aObject)

I didn't change the tests that load Shadow DOM tests in an iframe, in the interest of keeping hg annotation history.

Differential Revision: https://phabricator.services.mozilla.com/D11183

--HG--
extra : moz-landing-system : lando
2018-11-15 06:51:07 +00:00
Andreea Pavel e3299fd2db Backed out 5 changesets (bug 1498640, bug 1436037, bug 1497660, bug 1505579) for mass failures on a CLOSED TREE
Backed out changeset 914a7a899dd1 (bug 1436037)
Backed out changeset e072757bf691 (bug 1436037)
Backed out changeset b0805a8cf6eb (bug 1505579)
Backed out changeset aa32ba9e6df3 (bug 1498640)
Backed out changeset ce441b8a784c (bug 1497660)
2018-11-15 07:53:41 +02:00
Andrew Halberstadt b03e2aa337 Bug 1436037 - [python] Create Windows python-test tasks, r=gps
The following python-test paths are being moved out of 'make check' and into their own task:
- python/mozlint
- testing/mozbase
- tools/lint

The following python-test paths previously did not run on Windows:
- python/mozterm
- testing/marionette
- testing/raptor
- tools/tryselect

MozReview-Commit-ID: C07FANaYzf7

Depends on D10758

Differential Revision: https://phabricator.services.mozilla.com/D10759

--HG--
extra : moz-landing-system : lando
2018-11-15 00:49:45 +00:00
Andreea Pavel d51566f085 Backed out 2 changesets (bug 1503019) for failing crashtests at dom/base/crashtests/1505811.html on a CLOSED TREE
Backed out changeset 06b12fd41ff1 (bug 1503019)
Backed out changeset 7b845eac9dd7 (bug 1503019)
2018-11-15 01:52:30 +02:00
Timothy Guan-tin Chien c0cc4f74e7 Bug 1503019 - Part I, Remove dom.webcomponents.shadowdom.enabled r=smaug
This patch removes the dom.webcomponents.shadowdom.enabled pref and all its
references, including the following functions:

* nsContentUtils::IsShadowDOMEnabled()
* nsIDocument::IsShadowDOMEnabled()
* nsDocument::IsShadowDOMEnabled(JSContext* aCx, JSObject* aGlobal)
* nsDocument::IsShadowDOMEnabled(const nsINode* aNode)
* nsTextNode::IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject)

This function is renamed and updated to nsDocument::IsCallerChromeOrAddon():

* nsDocument::IsShadowDOMEnabledAndCallerIsChromeOrAddon(JSContext* aCx, JSObject* aObject)

I didn't change the tests that load Shadow DOM tests in an iframe, in the interest of keeping hg annotation history.

Differential Revision: https://phabricator.services.mozilla.com/D11183

--HG--
extra : moz-landing-system : lando
2018-11-14 19:34:52 +00:00
Gijs Kruitbosch 8987941d82 Bug 1506796 - use OpenBrowserWindow instead of window.open() to create a browser window, r=whimboo
Differential Revision: https://phabricator.services.mozilla.com/D11745

--HG--
extra : moz-landing-system : lando
2018-11-14 14:27:58 +00:00
Henrik Skupin 2612677f2e Bug 1332064 - [marionette] Re-enable test_navigation.py:test_focus_after_navigation. r=jgraham
Differential Revision: https://phabricator.services.mozilla.com/D11755

--HG--
extra : moz-landing-system : lando
2018-11-13 13:24:28 +00:00
Henrik Skupin 0a13b40b29 Bug 1506643 - [marionette] Disable "about:newtab" page, and always load "about:blank". r=ato
Differential Revision: https://phabricator.services.mozilla.com/D11691

--HG--
extra : moz-landing-system : lando
2018-11-12 19:59:45 +00:00
James Graham 9bf3c6a089 Bug 1500158 - Implement marionette support for fuzzy reftests, r=ato
This adds an extra field to the reftest comaprisons to hold the
minumum/maximum allowed differences per pixel channel and the
minumum/maximum number of pixels that may differ.

Differential Revision: https://phabricator.services.mozilla.com/D9129

--HG--
extra : moz-landing-system : lando
2018-11-08 17:04:55 +00:00
Andreas Tolfsen 4d97ed0425 bug 1492499: marionette: increase TimedPromise timeout on debug; r=whimboo
The things that rely on TimedPromise, such as awaiting a sizemodechange
event on exiting fullscreen, takes a lot longer to perform in Asan
and debug builds than in optimised builds.

This patch increases the TimedPromise timeout duration by three
times in debug builds, which is the same amount WPT uses.

Depends on D10569

Differential Revision: https://phabricator.services.mozilla.com/D11189

--HG--
extra : moz-landing-system : lando
2018-11-08 13:11:40 +00:00
Andreas Tolfsen fdddd29e71 bug 1492499: marionette: drop broken window maximization test; r=automatedtester
This test is duplicated by WPT tests.

Depends on D10568

Differential Revision: https://phabricator.services.mozilla.com/D10569

--HG--
extra : moz-landing-system : lando
2018-11-08 13:11:38 +00:00
Andreas Tolfsen d67daa8b34 bug 1492499: marionette: restore from maximized before setting rect; r=whimboo
On certain window manager configurations a window may be resized
to fit the full available dimensions of the screen without going
into the maximised state.  Similarily, a maximised window may be
the exact dimensions of the screen.

If the window outerWidth/outerHeight is 800x600 and in maximised
state, resizing it to 800x600 through WebDriver:SetWindowRect will
not work because the window has already reached its requested dimensions.

This patch ensures to wait for the resizeEnd event when the window
state is not normal.

Depends on D8419

Differential Revision: https://phabricator.services.mozilla.com/D10568

--HG--
extra : moz-landing-system : lando
2018-11-08 13:11:31 +00:00
Andreas Tolfsen de7f55fcf0 bug 1492499: marionette: empty event queue on window manipulation; r=automatedtester,whimboo
This requests an animation frame off ChromeWindow and waits for
the main thread's event queue to become idle in relation to window
manipulation commands.

It additionally clears the event queue before resizing, because
this is a particularly hazardous operation.  We don't know the
exact science as to why this is needed, so it may just be that this
introduces enough latency for the operation to complete successfully.
File this under "secret sauce".

This ensures all potential synchronisation code between e.g. the
parent process and the child processes have had time to run before
we return from WebDriver:{MinimizeWindow,MaximizeWindow,FullscreenWindow}.

Depends on D8418

Differential Revision: https://phabricator.services.mozilla.com/D8419

--HG--
extra : moz-landing-system : lando
2018-11-08 13:11:28 +00:00
Andreas Tolfsen d0917b9009 bug 1492499: marionette: wait for last event on resizing window; r=automatedtester,whimboo
My delegating to the main thread, waiting for the last DOM resize event
to fire, and requesting an animation frame from the ChromeWindow, we
can ensure the window is (more) synchronously resized.  This ensures
better reliability when setting a window's dimensions.

All this means we can get rid of the heuristics we use for "waiting
for a window resize" to occur by checking if the outerWidth/outerHeight
has changed.  These were obviously bug ridden.

Depends on D8417

Differential Revision: https://phabricator.services.mozilla.com/D8418

--HG--
extra : moz-landing-system : lando
2018-11-08 13:11:26 +00:00
Andreas Tolfsen b85c42be2d bug 1492499: marionette: make window positioning idempotent; r=whimboo
When the ChromeWindow is already in the desired x/y position,
WebDriver:SetWindowRect should act as a no-op.  This avoids a
superfluous call to ChromeWindow.moveTo.

Depends on D8416

Differential Revision: https://phabricator.services.mozilla.com/D8417

--HG--
extra : moz-landing-system : lando
2018-11-08 13:11:24 +00:00
Andreas Tolfsen a63546f5e2 bug 1492499: marionette: fix buggy window state comparison; r=whimboo
win.Maximized does not exist.  This should be WindowState.Maximized.

Depends on D8415

Differential Revision: https://phabricator.services.mozilla.com/D8416

--HG--
extra : moz-landing-system : lando
2018-11-08 13:11:22 +00:00
Andreas Tolfsen 4caae08c48 bug 1492499: marionette: accept sizemodechange may not always fire; r=automatedtester,whimboo
Unlike the visibilitychange event, sizemodechange appears to fire in a
mostly reliable way.  However, in the off-chance that sizemodechange
should not fire, we need an escape path so that Marionette returns
within a timely fashion.

Depends on D8414

Differential Revision: https://phabricator.services.mozilla.com/D8415

--HG--
extra : moz-landing-system : lando
2018-11-08 13:11:20 +00:00
Andreas Tolfsen aeb2acfd24 bug 1492499: marionette: bail if visibilitychange does not fire on minimization; r=whimboo
The visibilitychange DOM event does not fire reliably in all
configurations when retrieved from web content.  It appears to fire more
reliably in chrome, but to ensure a call to WebDriver:MinimizeWindow
never hangs, we additionally change it to be a TimedPromise.

There is an assumption here that if the iconification process does
not complete within this duration, there is nothing we can do.

Depends on D8413

Differential Revision: https://phabricator.services.mozilla.com/D8414

--HG--
extra : moz-landing-system : lando
2018-11-08 13:11:18 +00:00
Andreas Tolfsen 3d84531a75 bug 1492499: marionette: poll on restoring window; r=whimboo
Instead of waiting for the visibilitychange event to fire, which does
not work in headless mode, we can poll ChromeWindow.windowState which
appears to be a more reliable way of telling the window's current state.

This will resolve the problem where Marionette never returns from
restoration due to visibilitychange never firing, and will additionally
make it more reliable.

Depends on D8412

Differential Revision: https://phabricator.services.mozilla.com/D8413

--HG--
extra : moz-landing-system : lando
2018-11-08 13:11:16 +00:00
Andreas Tolfsen 78a0a14d3d bug 1492499: marionette: add debounce sync primitive; r=automatedtester
This adds a new synchronisation primitive to Marionette which will
allow us to wait for the last in a sequence of events to fire.
This is especially useful for high-frequency events such as the DOM
resize event, where multiple resize events may fire as the window
dimensions are being changed.

Depends on D8411

Differential Revision: https://phabricator.services.mozilla.com/D8412

--HG--
extra : moz-landing-system : lando
2018-11-08 13:11:14 +00:00
Mark Striemer 1f6ce6a3f9 Bug 1504890 - Restrict usage of event global r=Standard8,ahal
The event global is only available on Nightly so it should not be used.

Differential Revision: https://phabricator.services.mozilla.com/D10984
Differential Revision: https://phabricator.services.mozilla.com/D11125

--HG--
extra : rebase_source : 43d8c198a1eb9c633922d077a219f1cf17b811c1
2018-11-06 16:35:05 -06:00
Kirk Steuber 59411d310b Bug 1458308 - Remove app.update.auto and app.update.enabled from prefs.rs and marionette.js r=rstrong,ato
`app.update.auto` should actually never have been needed here. `app.update.disabledForTesting`, and before that, `app.update.enabled` will prevent updates altogether. Now that the `app.update.auto` pref is not the correct mechanism for disabling automatic update, this pref should be removed from these files.

`app.update.enabled` can also be removed from prefs.rs at this time as per the comment in the file indicating that it can be removed when Firefox 62 stabilizes.

Depends on D10315

Differential Revision: https://phabricator.services.mozilla.com/D10780

--HG--
extra : moz-landing-system : lando
2018-11-06 21:16:19 +00:00
Henrik Skupin 67e9facc1c Bug 1504940 - [marionette] Remove deprecated "acceptConnections" and "singleTap" commands. r=ato
Depends on D11001

Differential Revision: https://phabricator.services.mozilla.com/D11002

--HG--
extra : moz-landing-system : lando
2018-11-06 16:11:44 +00:00
Henrik Skupin 36e60c6f0a Bug 1488826 - [marionette] Disable content blocking introduction panel. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D11007

--HG--
extra : moz-landing-system : lando
2018-11-06 13:35:33 +00:00
Henrik Skupin dab04b1706 Bug 1504807 - [marionette] Don't remove pending command unless it has been completed. r=ato
With the use of multiple content processes in Firefox a navigation
command can cause the active framescript to be moved to a different
process. This interrupts the currently executed command, and as such
needs to be executed again after the framescript has been finished
initializing.

Currently flushing the pending commands doesn't take into account
that the framescript can even be moved multiple times to a different
process during a single page navigation. As such all pending commands
are getting removed after the first process move. For navigation
commands this means that no page load listeners are attached for
subsequent process changes, and navigation commands could never
return, and cause a hang of Marionette.

To solve the problem the pending commands need to be flushed each
time the process changes. They will remove themselves from the list
once they have finished processing.

Depends on D10998

Differential Revision: https://phabricator.services.mozilla.com/D10999

--HG--
extra : moz-landing-system : lando
2018-11-06 12:08:55 +00:00
Henrik Skupin 2e1c43e3bd Bug 1504807 - [marionette] Remove call to non-existent "Marionette:newSession" message listener. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D10998

--HG--
extra : moz-landing-system : lando
2018-11-06 13:16:42 +00:00
Andreas Tolfsen 0c2035a10b bug 1504478: marionette: remove deprecated commands; r=whimboo
This removes a series of deprecated Marionette commands following
a big naming scheme change a while back.  These commands could have
safely been removed since Firefox 63.

singleTap and acceptConnections were still in use in the Marionette
Python client, so they can only be removed in Firefox 66 at the
earliest.

WebDriver:AcceptDialog is used by geckodriver, which means it would
have to drop support for Firefox 57 in order to change to use
WebDriver:AcceptAlert.  Marking this as deprecated, but used in
geckodriver for now.

Depends on D10836

Differential Revision: https://phabricator.services.mozilla.com/D10837

--HG--
extra : moz-landing-system : lando
2018-11-05 18:40:39 +00:00
Andreas Tolfsen 38d7de0c11 bug 1504478: marionette: update tests to use non-deprecated commands; r=whimboo
Depends on D10835

Differential Revision: https://phabricator.services.mozilla.com/D10836

--HG--
extra : moz-landing-system : lando
2018-11-05 18:40:37 +00:00
Andreas Tolfsen d9e33fd0fd bug 1504478: marionette: use SingleTap and AcceptConnections in Python client; r=whimboo
The singleTap and acceptConnections commands are deprecated in
favour of, respectively, Marionette:SingleTap and
Marionette:AcceptConnections.

Differential Revision: https://phabricator.services.mozilla.com/D10835

--HG--
extra : moz-landing-system : lando
2018-11-05 18:40:33 +00:00
Andreas Tolfsen d176f8738a bug 1502864: marionette: enable strict file interactability in Python client; r=whimboo
Depends on D10275

Depends on D10275

Differential Revision: https://phabricator.services.mozilla.com/D10574

--HG--
extra : moz-landing-system : lando
2018-11-03 16:30:48 +00:00
Andreas Tolfsen a2d9a2d14e bug 1502864: marionette: support strictFileInteractability; r=whimboo
This patch changes Marionette to only run the interactability test
on <input type=file> when the strictFileInteractability capability is set.

strictFileInteractability is not set by default which means
this changes WebDriver:SendElementKeys' behaviour to not run
interactability checks on <input type=file>.  This aligns our
WebDriver implementation with the current behaviour in Chrome.

To make it legible what the input to interaction.sendKeysToElement
is, its API has changed to take an options dictionary instead of
three boolean arguments at the end.

Depends on D10274

Depends on D10274

Differential Revision: https://phabricator.services.mozilla.com/D10275

--HG--
extra : moz-landing-system : lando
2018-11-03 16:31:00 +00:00
Cosmin Sabou 3b735243ab Merge mozilla-central to mozilla-inbound. a=merge
--HG--
extra : rebase_source : 8505e939743adff1ac28bbacc959496d6e254a44
2018-11-02 23:51:14 +02:00
Ciure Andrei ea4e67046a Backed out 8 changesets (bug 1502864) for failing test_capabilities.py CLOSED TREE
Backed out changeset 6e4454a6f3ee (bug 1502864)
Backed out changeset 3f7ca511af8c (bug 1502864)
Backed out changeset 9382a6630231 (bug 1502864)
Backed out changeset 1eb51f6b4ba0 (bug 1502864)
Backed out changeset 2fda41394085 (bug 1502864)
Backed out changeset 0b421dd8a7d5 (bug 1502864)
Backed out changeset 9caa2f0e2e38 (bug 1502864)
Backed out changeset 7616e25a07b3 (bug 1502864)
2018-11-02 19:14:52 +02:00
Andreas Tolfsen 3e749797be bug 1502864: marionette: enable strict file interactability in Python client; r=whimboo
Depends on D10275

Differential Revision: https://phabricator.services.mozilla.com/D10574

--HG--
extra : moz-landing-system : lando
2018-11-02 15:57:44 +00:00
Andreas Tolfsen 4682953bdc bug 1502864: marionette: support strictFileInteractability; r=whimboo
This patch changes Marionette to only run the interactability test
on <input type=file> when the strictFileInteractability capability is set.

strictFileInteractability is not set by default which means
this changes WebDriver:SendElementKeys' behaviour to not run
interactability checks on <input type=file>.  This aligns our
WebDriver implementation with the current behaviour in Chrome.

To make it legible what the input to interaction.sendKeysToElement
is, its API has changed to take an options dictionary instead of
three boolean arguments at the end.

Depends on D10274

Differential Revision: https://phabricator.services.mozilla.com/D10275

--HG--
extra : moz-landing-system : lando
2018-11-02 14:26:06 +00:00
Andreas Tolfsen 8b6ed20034 bug 1504223: marionette: stop duplicating capabilities in new session request; r=whimboo
As a backwards compatibility measure following bug 1388424 which
removed the ability to set the session ID, we duplicated the
capabilities dictionary in the request body.

Since this shipped through all the trees as part of Firefox 60,
we can now drop this compatibility measure.

Differential Revision: https://phabricator.services.mozilla.com/D10733

--HG--
extra : moz-landing-system : lando
2018-11-02 15:15:37 +00:00
Andreas Tolfsen ea1d6872f4 bug 1504174: marionette: delete unused test_window_fullscreen.py test; r=automatedtester
The test_window_fullscreen.py test is not run because it is not
part of the test manifest.  Since it is duplicated by WPT test,
we will not try to resurrect it by fixing the test.

Differential Revision: https://phabricator.services.mozilla.com/D10710

--HG--
extra : moz-landing-system : lando
2018-11-02 14:08:11 +00:00
Andreas Tolfsen 07c0fa4fe6 bug 1502268: marionette: provide informative messages for unexpected alert open error; r=whimboo
Provides specific error messages informing the user what action
was taken with the user prompt, based on the configuration of the
unhandled prompt handler.

Differential Revision: https://phabricator.services.mozilla.com/D10089

--HG--
extra : moz-landing-system : lando
2018-10-31 00:37:15 +00:00
Henrik Skupin 81bcc04ac0 Bug 1503015 - [marionette] Added unhandled prompt check to "WebDriver:FindElements". r=ato
Differential Revision: https://phabricator.services.mozilla.com/D10181

--HG--
extra : moz-landing-system : lando
2018-10-30 22:08:24 +00:00
Henrik Skupin 5fcc1832bd Bug 1416747 - [marionette] Hardening test_cli_arguments.py TestCommandLineArguments.test_startup_timeout. r=ato
Using a startup timeout of 0s should always cause an IOError,
even for builds which startup within 100ms (pgo, Nightly opt).

Further the test should not modify the internal startup timeout
property, but pass the timeout as parameter to "start_session()".

Differential Revision: https://phabricator.services.mozilla.com/D10224

--HG--
extra : moz-landing-system : lando
2018-10-30 21:47:29 +00:00
Andreas Tolfsen 48089e16fe bug 1492499: marionette: warn on TimedPromise bailing; r=automatedtester
We often use TimedPromise to ensure Marionette does not unexpectedly
block on a promise that, for whatever reason, does not resolve.
It can however be useful to be alerted when they don't, as it quite
often means there is an underlying problem.

Depends on D8406

Differential Revision: https://phabricator.services.mozilla.com/D8407

--HG--
extra : moz-landing-system : lando
2018-10-11 16:40:36 +00:00
Andreas Tolfsen fdfb04c5da bug 1492499: marionette: trim crlf off produced stack; r=automatedtester
The stack is joined with "\n" causing an extra carriage return line
feed to appear at the end of the string.

Depends on D8405

Differential Revision: https://phabricator.services.mozilla.com/D8406

--HG--
extra : moz-landing-system : lando
2018-10-11 16:40:08 +00:00
Andreas Tolfsen 87c38be65a bug 1492499: marionette: fix GeckoDriver#setWindowRect docs; r=automatedtester
Differential Revision: https://phabricator.services.mozilla.com/D8404

--HG--
extra : moz-landing-system : lando
2018-10-11 16:10:28 +00:00
Bob Clary a62c29cd3e Bug 1502190 - bump mozdevice requirements for raptor, marionette, mozrunner, r=gbrown. 2018-10-26 09:51:37 -07:00
Henrik Skupin 484490cfc2 Bug 1430717 - Re-enable test_cli_arguments.py TestCommandLineArguments.test_startup_timeout. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D9495

--HG--
extra : moz-landing-system : lando
2018-10-23 10:55:47 +00:00
Henrik Skupin 1712246fff Bug 1397612 - [marionette] Re-enable test TestQuitRestart.test_in_app_restart_safe_mode. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D9389

--HG--
extra : moz-landing-system : lando
2018-10-22 14:16:38 +00:00
Andreas Tolfsen 67c1b23922 bug 1499360: marionette: convert in-view centre point to css pixels; r=whimboo
When the in-view centre point contains a floating point, we need to
ensure to convert it to CSS pixels before passing it on to Gecko internals
such as DOMElement.elementsFromPoint and DOMWindowUtils.sendMouseEvent.

For example, with a click target that is a 1x1 square, the in-view
centre point prior to this patch was calculated to (0.5,0.5).
elementsFromPoint will (correctly?) round this coordinate down and
return the paint tree for the DOM element at (0,0) coordinates.

By contrast, sendMouseEvent will click coordinates (1,1) because it
rounds up.  To make sure we all speak the same language internally,
we round the centre point down.

Differential Revision: https://phabricator.services.mozilla.com/D8880

--HG--
extra : moz-landing-system : lando
2018-10-22 14:21:27 +00:00
Henrik Skupin 7aad85995b Bug 1500242 - [marionette] Obey the extended shutdown timeout for Firefox ASAN builds. r=ato
Firefox uses different shutdown timeouts for the terminator thread
depending on the build type. For opt/debug builds this will be 60s,
while for ASAN builds 180s are used.

Currently Marionette only takes the 60s into account, and always
kills the binary after 70s if a shutdown hasn't happened by that
time. This actually prevents the background hang monitor to kill
Firefox for ASAN builds, and to report a meaningful crash report
for the shutdown hang.

To inform clients about the correct shutdown timeout, a new vendor
specific capability with the name `moz:shutdownTimeout` is used as
part of the new session capabilities.

Depends on D9227

Differential Revision: https://phabricator.services.mozilla.com/D9228

--HG--
extra : moz-landing-system : lando
2018-10-19 11:52:42 +00:00
Henrik Skupin c1bb4cb728 Bug 1500242 - [marionette] Don't modify DEFAULT_SHUTDOWN_TIMEOUT constant. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D9227

--HG--
extra : moz-landing-system : lando
2018-10-19 11:54:13 +00:00
Cosmin Sabou 5115d61980 Merge mozilla-inbound to mozilla-central. a=merge 2018-10-19 00:54:29 +03:00