nsIDOMWindow is the XPCOM interface and not what we mean in all these
cases. We either want to refer to the ChromeWindow or to the WindowProxy,
depending on the context of the code.
MozReview-Commit-ID: 405po1XLXRi
--HG--
extra : rebase_source : 47a179f7caed76592dab28f8e10550cda5fe3d02
The other window state manipulation commands are named minimizeWindow
and maximizeWindow.
MozReview-Commit-ID: IBVqJSRwG8x
--HG--
extra : rebase_source : a1efaf7cf2a5c068b62c60453b1f8814d34b043b
The other window state manipulation commands are named minimizeWindow
and maximizeWindow.
MozReview-Commit-ID: IBVqJSRwG8x
--HG--
extra : rebase_source : 29271a475a847ca15c1d8f736520b238c0818791
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
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
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
The WebDriver service in the remote protocol accepts sessionId and
session_id and we only need on. All known consumers are using sessionId,
and we can drop the session_id fallback.
MozReview-Commit-ID: 6fa5Lgkzwfu
The element click functions in testing/marionette/interaction.js are
generator functions using "yield". This patch converts them to async
functions.
MozReview-Commit-ID: 4A4cTaY619w
Because the sizemodechange event is not synchronous on all platforms,
we additionally need to await the window's dimensions to change.
However, if the window manager does not have a notion of a maximised
state, this operation too could time out. However, it is believed
that the additional wait will allow for the window to transition to the
required state in this scenario.
MozReview-Commit-ID: KeHJMKSJfjQ
--HG--
extra : rebase_source : 797b3be8f6adb027f15dd638f22afa6efd0f0432
The element click functions in testing/marionette/interaction.js are
generator functions using "yield". This patch converts them to async
functions.
MozReview-Commit-ID: 4A4cTaY619w
--HG--
extra : rebase_source : 1b6f1b545f438ae253fd4024500bf41536d976aa
Implements the backend for the WebDriver standard's Minimize Window
command.
Signed-off-by: Andreas Tolfsen <ato@sny.no>
MozReview-Commit-ID: F5Z38LxhOJm
--HG--
extra : rebase_source : 81c8d78ad8d9ae66a8ab37e635cce9af518224de
Various fixes to make the generated API documentation from
testing/marionette somewhat easier to read.
MozReview-Commit-ID: F9duuQoOYBt
--HG--
extra : rebase_source : 3ade69773ceba42826aedef05b1371240b51cf82
When linting the Marionette server code,
https://searchfox.org/mozilla-central/commit/de001d80b777ff0fcfa823a52e8d49b4981af040
accidentally removed the missing window check from the
Marionette:GetWindowRect command. This change reintroduces the
check that was accidentally removed.
MozReview-Commit-ID: FkDOUKR2dIi
--HG--
extra : rebase_source : abc32aec9b005f341d1e1deb1bbc9a3132dd35cb
baseURI isn't actually we have to check for to get the
current documents URI. Therefore documentURI exists.
MozReview-Commit-ID: CDhOZ8lU2qJ
--HG--
extra : rebase_source : c53f79468a7d319bd5e7aa40338fce0ca7299bd4
With multi-processes for content reloads of the frame script
can happen at any time, and not only for remoteness changes.
As such the current browser has to be re-registered with the
new id of the listener.
MozReview-Commit-ID: 48MOZfuPTR9
--HG--
extra : rebase_source : 60e91ae7e1cdc942d0ac9a9dd3aac3baeccc5ddf
This wrapper just calls back into the MarionetteDriver, and
doesn't have any value. Removing it simplifies the call stack.
MozReview-Commit-ID: GH1xUHX12Xi
--HG--
extra : rebase_source : a3b9e57e63809c9936fdb2686ad6016339ea7bf7
By not using the JSON format when sending the capabilities to the
frame script, the values cannot be correctly decoded. As result
the capabilities will be reset to their default values for the
listener, and can cause various failures.
MozReview-Commit-ID: KaryoJiyd30
--HG--
extra : rebase_source : 206e45755d3ea9b6cbf2f2022a9a364dcf22d78e
To retrieve the title of the currently selected content browser
it is not necessary to call into the frame script. Instead just
take the value from the parent process directly.
MozReview-Commit-ID: KEpYKLIydrJ
--HG--
extra : rebase_source : 8b179de7057f8655a81656bd4d95b1562edb9f54
getContext and setContext are duplicated further up under the Marionette
serivce entries.
MozReview-Commit-ID: 2V5S2XG6wDw
--HG--
extra : rebase_source : 1f22adc294c063f014e3a0e884a01ed6a7fbe43e
In particular, XPCNativeWrapper should probably be made available
by default.
MozReview-Commit-ID: E1oYFyApbLi
--HG--
extra : rebase_source : 4e27ad6882bd4e43dadc97d4fd2a186e01510dfd
Instead of importing everything from the testing/marionette/error.js
module into the global scope, we need to be selective about what symbols
we want.
MozReview-Commit-ID: HZDAS0bs0GD
--HG--
extra : rebase_source : 14a300bb2cedc0716168d50846755a6faed83012
The quitApplication command was accidentally removed in 1e96a289d28a.
This adds it back as a recognised command alias in order to not break
geckodriver.
MozReview-Commit-ID: IZ0h8dv9ILt
--HG--
extra : rebase_source : 61550dae3a71973a2028d6384bc3eab388c17c21
In some cases the click command can trigger the closing of the
currently selected tab or window. To not cause a hang when waiting
for a response from the removed framescript, the tab and window
closing events have to be observed. Also the command has to return
immediately.
MozReview-Commit-ID: 9WeXryrKEJr
--HG--
extra : rebase_source : a7a23cf19e55eecbf957d48c2182a601d63d0909
This adds commands to start a reftest session, run a test, and end the
session. It as assumed that after you start a reftest session you will
just run reftests until you end the session. When starting a session
the user provides a string indicating when screenshots should be
taken, and an object mapping urls to a count of the number of times
that url is expected to be used in the session, to help with
caching. Running the tests takes a url to a test, an expected status,
a timeout, and a nested list of possible references, in which each
entry at a specific level is combined by OR and nested references are
combined by AND.
The implementation is heavilly inspired by the existing reftest
harness, starting a minimal window with no tabs, and loading the urls
directly in there. In order to get a screenshot in the e10s case we
have to pass the DRAW_VIEW and USE_WIDGET_LAYERS flags when taking the
screenshot.
For performance we heavily cache canvases; for references that will be
repeated we cache the full canvas with image, and we also cache a
single canvas to use for all other screenshots to avoid the overhead
of repeatedly creating a new canvas element.
MozReview-Commit-ID: JOFvtmH7tg
Because this window is a normal Firefox window but doesn't contain any
tabs, the normal Marionette functions for iterating over windows don't
work well. As a sort of hack, identify this window by the id of its
root element, and special case it when finding windows in Marionette.
MozReview-Commit-ID: LxPv13YDXDu
This allows other commands to implicitly change the window handle, by
calling findWindow with appropriate arguments to get a window
properties object and then passing that to setWindowHandle.
MozReview-Commit-ID: 4NpYxjsMM4T
This adds commands to start a reftest session, run a test, and end the
session. It as assumed that after you start a reftest session you will
just run reftests until you end the session. When starting a session
the user provides a string indicating when screenshots should be
taken, and an object mapping urls to a count of the number of times
that url is expected to be used in the session, to help with
caching. Running the tests takes a url to a test, an expected status,
a timeout, and a nested list of possible references, in which each
entry at a specific level is combined by OR and nested references are
combined by AND.
The implementation is heavilly inspired by the existing reftest
harness, starting a minimal window with no tabs, and loading the urls
directly in there. In order to get a screenshot in the e10s case we
have to pass the DRAW_VIEW and USE_WIDGET_LAYERS flags when taking the
screenshot.
For performance we heavily cache canvases; for references that will be
repeated we cache the full canvas with image, and we also cache a
single canvas to use for all other screenshots to avoid the overhead
of repeatedly creating a new canvas element.
MozReview-Commit-ID: JOFvtmH7tg
--HG--
extra : rebase_source : ab5a2ef2e450b9bbdc6bc3c9487ed5dfda2c1d4b
Because this window is a normal Firefox window but doesn't contain any
tabs, the normal Marionette functions for iterating over windows don't
work well. As a sort of hack, identify this window by the id of its
root element, and special case it when finding windows in Marionette.
MozReview-Commit-ID: LxPv13YDXDu
--HG--
extra : rebase_source : 8c0aa7a4aeff69e1d7c86ba7cbb6c421abd0c31d
This allows other commands to implicitly change the window handle, by
calling findWindow with appropriate arguments to get a window
properties object and then passing that to setWindowHandle.
MozReview-Commit-ID: 4NpYxjsMM4T
--HG--
extra : rebase_source : 9b53d8b10e2341624c3add5e9975aab47e0b320f