Commit Graph

618 Commits

Author SHA1 Message Date
Henrik Skupin
c631c98202 Bug 1504756 - [marionette] Added "WebDriver:NewWindow" command to open a new top-level browsing context. r=ato
The patch adds the end-point for the recently defined `New Window`
command (https://github.com/w3c/webdriver/issues/1138). It allows
to open a new top-level browsing context as tab or as window.

Depends on D13662

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

--HG--
extra : moz-landing-system : lando
2019-01-10 10:14:24 +00:00
Henrik Skupin
ea87c4dedf Bug 1504756 - [marionette] Remove default timeout from PollPromise. r=ato
By default PollPromise has to behave similar to a normal Promise
and wait forever until it gets resolved or rejected.

Depends on D13662

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

--HG--
extra : moz-landing-system : lando
2019-01-10 10:12:24 +00:00
Henrik Skupin
74c45eb2ed Bug 1504756 - [marionette] Use waitForObserverTopic when waiting for observer notifications. r=ato
Depends on D13661

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

--HG--
extra : moz-landing-system : lando
2019-01-10 10:14:22 +00:00
Henrik Skupin
2575586fb6 Bug 1504756 - [marionette] Use waitForEvent() when waiting for events. r=ato
Depends on D13659

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

--HG--
extra : moz-landing-system : lando
2019-01-10 10:10:47 +00:00
Brindusan Cristian
75f86d396d Backed out 7 changesets (bug 1504756) for xpcshell failures on test_sync.js.
Backed out changeset 9d80f662ad2b (bug 1504756)
Backed out changeset 8f9d90979825 (bug 1504756)
Backed out changeset 9715660f8c07 (bug 1504756)
Backed out changeset c25c93d2dc4d (bug 1504756)
Backed out changeset 58ab81d373b9 (bug 1504756)
Backed out changeset 21658a2d0174 (bug 1504756)
Backed out changeset 93ff3f0d95bd (bug 1504756)
2019-01-09 21:57:50 +02:00
Henrik Skupin
d950f23ac6 Bug 1504756 - [marionette] Added "WebDriver:NewWindow" command to open a new top-level browsing context. r=ato
The patch adds the end-point for the recently defined `New Window`
command (https://github.com/w3c/webdriver/issues/1138). It allows
to open a new top-level browsing context as tab or as window.

Depends on D13662

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

--HG--
extra : moz-landing-system : lando
2019-01-09 18:27:28 +00:00
Henrik Skupin
3664921097 Bug 1504756 - [marionette] Remove default timeout from PollPromise. r=ato
By default PollPromise has to behave similar to a normal Promise
and wait forever until it gets resolved or rejected.

Depends on D13662

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

--HG--
extra : moz-landing-system : lando
2019-01-09 18:24:06 +00:00
Henrik Skupin
b0f2aca7f3 Bug 1504756 - [marionette] Use waitForObserverTopic when waiting for observer notifications. r=ato
Depends on D13661

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

--HG--
extra : moz-landing-system : lando
2019-01-09 18:27:25 +00:00
Henrik Skupin
2412720695 Bug 1504756 - [marionette] Use waitForEvent() when waiting for events. r=ato
Depends on D13659

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

--HG--
extra : moz-landing-system : lando
2019-01-09 18:22:19 +00:00
Andreas Tolfsen
9ed472d436 bug 1510929: marionette: remove scriptTimeout parameter; r=whimboo
Depends on D15583

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

--HG--
extra : moz-landing-system : lando
2019-01-03 11:20:16 +00:00
Cosmin Sabou
4d5fd1304e Backed out 6 changesets (bug 1504756) as requested by whimboo in order to stop some wpt and mn intermittents. a=backout
Backed out changeset d7d78e79f0b3 (bug 1504756)
Backed out changeset 5c495fd7f64d (bug 1504756)
Backed out changeset 5c2826c58f9e (bug 1504756)
Backed out changeset f23b667d8bfa (bug 1504756)
Backed out changeset 6068c233f4ef (bug 1504756)
Backed out changeset 65858c8c0fbd (bug 1504756)

--HG--
extra : rebase_source : 6b895c62a74c6f7521e4a4baff3b0498c65fcbf9
2018-12-20 18:07:02 +02:00
Henrik Skupin
52b84a6f90 Bug 1504756 - [marionette] Added "WebDriver:NewWindow" command to open a new top-level browsing context. r=ato
The patch adds the end-point for the recently defined `Create window`
command (https://github.com/w3c/webdriver/issues/1138). It allows
to open a new top-level browsing context as tab or as window.

Depends on D13662

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

--HG--
extra : moz-landing-system : lando
2018-12-05 19:58:06 +00:00
Henrik Skupin
eb8486826a Bug 1504756 - [marionette] Use waitForObserverTopic when waiting for observer notifications. r=ato
Depends on D13661

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

--HG--
extra : moz-landing-system : lando
2018-12-05 19:57:48 +00:00
Henrik Skupin
e099e3a840 Bug 1504756 - [marionette] Use waitForEvent() when waiting for events. r=ato
Depends on D13659

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

--HG--
extra : moz-landing-system : lando
2018-12-05 19:56:56 +00:00
Cosmin Sabou
5d8f09e4fd Backed out 6 changesets (bug 1504756) for wpt failures on webdriver/tests/execute_script/promise.py
Backed out changeset d808b528532a (bug 1504756)
Backed out changeset 30d345cce5be (bug 1504756)
Backed out changeset a8ea6d01fbe1 (bug 1504756)
Backed out changeset ba627a1b61dc (bug 1504756)
Backed out changeset c90e4b2e1b28 (bug 1504756)
Backed out changeset 04da1f01afba (bug 1504756)
2018-12-05 08:33:46 +02:00
Henrik Skupin
1a084b6641 Bug 1504756 - [marionette] Added "WebDriver:NewWindow" command to open a new top-level browsing context. r=ato
The patch adds the end-point for the recently defined `Create window`
command (https://github.com/w3c/webdriver/issues/1138). It allows
to open a new top-level browsing context as tab or as window.

Depends on D13662

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

--HG--
extra : moz-landing-system : lando
2018-12-04 21:59:43 +00:00
Henrik Skupin
6cd30adf3d Bug 1504756 - [marionette] Use waitForObserverTopic when waiting for observer notifications. r=ato
Depends on D13661

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

--HG--
extra : moz-landing-system : lando
2018-12-04 21:59:39 +00:00
Henrik Skupin
cbb83ceeeb Bug 1504756 - [marionette] Use waitForEvent() when waiting for events. r=ato
Depends on D13659

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

--HG--
extra : moz-landing-system : lando
2018-12-04 21:57:51 +00:00
Geoff Lankow
fe3e835c8c Bug 1506523 - Adapt Marionette so it can run on Thunderbird; r=whimboo
--HG--
extra : rebase_source : 65b6677dfe8672b4972f65dcf50228a826a4ba9e
2018-11-23 10:38:19 +13: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
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
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
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
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
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
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
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
Andreas Tolfsen
a115b1e6e9 bug 1490333: marionette: move whenIdle to sync module; r=whimboo
This patch moves the private whenIdle function to sync so it can
be shared across JSMs.

It also changes its semantics somewhat, so that instead of taking
a callback function (suitable for DOM event callbacks) it returns
a promise that is resolved when the main thread becomes idle and
the window has completed an animation frame tick.
2018-09-14 11:38:29 +01:00
arthur.iakab
2cbae6f64f Backed out changeset 3624871612dd (bug 1490333) for Eslint failure 2018-09-13 23:17:07 +03:00
Andreas Tolfsen
1e9bb7ecbc bug 1490333: marionette: move whenIdle to sync module; r=whimboo
This patch moves the private whenIdle function to sync so it can
be shared across JSMs.

It also changes its semantics somewhat, so that instead of taking
a callback function (suitable for DOM event callbacks) it returns
a promise that is resolved when the main thread becomes idle and
the window has completed an animation frame tick.
2018-09-13 20:52:39 +01:00
Henrik Skupin
f8100cc65b Bug 1398111 - [marionette] Virtually set Firefox as top-most application in WebDriver:NewSession. r=ato
To allow the focusmanager testmode to raise focus events even with
the Firefox window in the background, the current chrome window has
to be virtually brought into foreground. This should be at least
always done when creating a new session.

--HG--
extra : rebase_source : f080d6e85f0b3d68b8ce99ece9bb9e975806f50a
2018-06-07 08:59:42 +02:00
Henrik Skupin
0e52e2a27a Bug 1398111 - [marionette] Update mainFrame and curFrame when switching chrome windows. r=ato
When switching between chrome windows Marionette doesn't update
its references for the mainFrame (current chrome window) and
curFrame (current frame inside the chrome window). Instead it
gets currently only updated when a new chrome window opens.

It means that in most cases Marionette sets the focus on the
wrong chrome window and frame.

--HG--
extra : rebase_source : 3aebd6a15e46f183b32f4d7cf6727ef6c370f6f3
2018-06-07 08:51:27 +02:00
Ciure Andrei
d1376bd7ec Merge inbound to mozilla-central. a=merge 2018-09-01 01:40:48 +03:00
Ciure Andrei
b85e12536f Backed out 1 changesets (bug 1487358) for causing a regression in Selenium a=backout
Backed out changeset baa98a473b15 (bug 1487358)
2018-08-31 22:07:52 +03:00
Dave Townsend
e1f6637191 Bug 1487246: Remove uses of comma sequences in linted code. r=Standard8
Two cases were hiding permanently failing tests. I've commented those out and
filed bug 1487431.

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

--HG--
extra : rebase_source : 232fa6173de8844a9c47d59926ec8e39d0640ecd
2018-08-29 16:12:55 -07:00
Henrik Skupin
76c84025d2 Bug 1487358 - [marionette] "Accept Alert" and "Dismiss Alert" should check for remaining user prompts. r=ato
Workaround until we have a sane dynamic user prompt implementation
(see bug 1477977). At least for now this patch will give us the
opportunity to handle multiple open user prompts.

--HG--
extra : rebase_source : 4a242daef46287051fc6be4c4d9353046d0f6559
2018-08-30 15:06:47 +02:00
Henrik Skupin
38c57edd5b Bug 1486485 - [marionette] Replace and not append text for "WebDriver:SendAlertText". r=jgraham
--HG--
extra : rebase_source : f2a07d425f099ea4f7bd8dae75f41369ba531228
2018-08-27 17:37:20 +02:00
Henrik Skupin
fe48ee7ee8 Bug 1479368 - [marionette] Wait for tab modal dialog to disappear.
Both "WebDriver:AcceptAlert" and "WebDriver:DismissAlert" have to
wait until the tab modal dialog has been closed.

--HG--
extra : rebase_source : 64742b03faa900fe301a684a17666e3366322f5b
2018-08-22 22:24:39 +02:00
Kris Maglione
3a5c05e76f Bug 1484496: Part 5e - Convert remaining nsISimpleEnumerator users to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3733

--HG--
extra : rebase_source : c0fac176d7b3d840c4dbb14f8d95ccfc7f83a5a8
extra : histedit_source : a92c40117d0808a3ad68c972f622a7a42c9ae8ba
2018-08-18 18:13:14 -07:00
Brian Grinstead
357480ec96 Bug 1479125 - Update marionette driver to access tabBrowser.tabs as an iterable;r=ato
MozReview-Commit-ID: 5CLK6V3u0iG

--HG--
extra : rebase_source : 2a21683e6b5f5dce7841e01d2687963820a3d32a
2018-08-08 15:22:39 -07:00