When the requested window position is the same as the current position,
we should avoid the wait condition.
MozReview-Commit-ID: 3koG5BeOkFC
--HG--
extra : rebase_source : a131342cdd13569fb938f2e328ac0fb6982dc71e
Return from the Set Window Size command only after the window resize
DOM event has occurred.
MozReview-Commit-ID: 7ygZuNJZzq2
--HG--
extra : rebase_source : 3922d86de4eaa854795506b4ff5176ffdd4af98f
This change makes the Set Window Position command synchronous by waiting
for the original window position to change before returning.
MozReview-Commit-ID: 3gOv6bNPASV
--HG--
extra : rebase_source : 7b4b34aab5c11172e1c12ad62b8017ff0a92a566
The testing/marionette/browser.js window getter does not return the
same window as `GeckoDriver#getCurrentWindow`. This is a problem,
but for now we can rely on `getCurrentWindow`.
MozReview-Commit-ID: PT9M7boPM7
--HG--
extra : rebase_source : bf61c18b9a3ab7865cdc3aa063875313823ff295
Given that this method will be used in each command for checks of a valid window, we have to return
the currently active window. It means the window mediator should only be used during setting up the
session to find the first browser window.
At the same time the code in this method is getting split-up for chrome and content scopes.
MozReview-Commit-ID: KyzxYk63RgA
--HG--
extra : rebase_source : 0ff9ab53babcf60e9120d435ea6abb82d70aebec
When the requested window position is the same as the current position,
we should avoid the wait condition.
MozReview-Commit-ID: 3koG5BeOkFC
--HG--
extra : rebase_source : 028ad911ad387aa2b16051666c064e7d618fcbe4
Return from the Set Window Size command only after the window resize
DOM event has occurred.
MozReview-Commit-ID: 7ygZuNJZzq2
--HG--
extra : rebase_source : b9e2aa5720eb0527eb04bd80abc854217f30ac29
This change makes the Set Window Position command synchronous by waiting
for the original window position to change before returning.
MozReview-Commit-ID: 3gOv6bNPASV
--HG--
extra : rebase_source : 50b3f3aedce8ea732fd8e196c70bf86e003981d0
The testing/marionette/browser.js window getter does not return the
same window as `GeckoDriver#getCurrentWindow`. This is a problem,
but for now we can rely on `getCurrentWindow`.
MozReview-Commit-ID: PT9M7boPM7
--HG--
extra : rebase_source : 065b16b3801c002ac379a7beefcd66bea2c20bfb
Using switch_to_window() with a chrome window handle should not change the selected tab within
a browser window. It means we first have to check if it is a chrome handle, and only if it's not,
we should care about content window handles.
MozReview-Commit-ID: IcmCcmVy26T
--HG--
extra : rebase_source : 8f078d40b55da5553426c7cf547dc6330fe379fe
To be able to run tests for backgrounds tabs, and to stay in compatibility
with switch_to_frame(), switch_to_window() has to support the `focus` parameter.
MozReview-Commit-ID: YGPJisiI2i
--HG--
rename : testing/marionette/harness/marionette_harness/tests/unit/test_window_switching.py => testing/marionette/harness/marionette_harness/tests/unit/test_switch_window_content.py
extra : rebase_source : 3f7ce9d926e5f862c39a20646fb7cf8575fe233a
There are several places which make use of DOMWindowUtils to determine the
outer window id. Lets centralize it to a single method to avoid duplication.
MozReview-Commit-ID: 1IRKMpBPFH
--HG--
extra : rebase_source : 98307ddf40a67e61910aa6391a37fca6081adaa5
So far Marionette did support Fennec but not any of its tab handling
features. As such most of the commands fail because they do not take
BrowserApp into account.
This patch adds support for retrieving window handles, switching
between windows, and closing tabs.
Additionally to those changes a couple of unit tests are getting
updated, and added.
MozReview-Commit-ID: 7sbVIblm0Hw
--HG--
rename : testing/marionette/harness/marionette_harness/tests/unit/test_window_handles.py => testing/marionette/harness/marionette_harness/tests/unit/test_window_handles_content.py
extra : rebase_source : 34bfcd680162d4296d524f72f7d6190ef64682b8
So far Marionette did support Fennec but not any of its tab handling
features. As such most of the commands fail because they do not take
BrowserApp into account.
This patch adds support for retrieving window handles, switching
between windows, and closing tabs.
Additionally to those changes a couple of unit tests are getting
updated, and added.
MozReview-Commit-ID: 7sbVIblm0Hw
--HG--
rename : testing/marionette/harness/marionette_harness/tests/unit/test_window_handles.py => testing/marionette/harness/marionette_harness/tests/unit/test_window_handles_content.py
extra : rebase_source : 475dd6bee446f58208192202cd4c483e2fd929dc
To avoid a race condition for the close() commands Marionette has to wait until the current
window/tab has actually been closed. To make this work we have to wait for the appropriate
events to occur. Also the methods have to return the list of remaining window handles.
MozReview-Commit-ID: DegcTJyKXCx
--HG--
extra : rebase_source : a6bd46d2d721f56fcc07a0722f2155ea29dc6fbc
This change resets the session ID after all other state has been cleared,
and also reinitialises `GeckoDriver#sessionCapabilities`, which was not
done before.
MozReview-Commit-ID: Jb40CXuX8h1
--HG--
extra : rebase_source : 226875ea929f0e7e471fe58499f76313fc60947e
This change removes session capability processing
from testing/marionette/driver.js and replaces it with
testing/marionette/session.js and `session.Capabilities`.
Session timeout durations used to be stored in properties
exposed directly on the `GeckoDriver` prototype, but these are now
represented by `GeckoDriver#timeouts`, which is a pointer (getter) of
`GeckoDriver#sessionCapabilities#timeouts`. The same is true for other
session-scoped state.
Since capabilities parsing is not unique to starting a new session,
the errors thrown by `session.Capabilities.fromJSON` are re-thrown
in `GeckoDriver#newSession` since it is required that we return a
`SessionNotCreatedError` on parsing them during session creation.
MozReview-Commit-ID: I3Xu2v71n4S
--HG--
extra : rebase_source : 40cef31adf238bef021a7c7c2713016a34f35920
Unit tests which do a restart/quit of the application should not be run if Marionette
doesn't handle the instance. Otherwise Marionette is not able to launch the application
again for further tests.
MozReview-Commit-ID: 8mKylM0r4dM
--HG--
extra : rebase_source : 8d1853c376fe36c4f779b3d417edb2dbb829a1a3
When a new Marionette session is started, the web content frame (currently
selected <xul:browser> element) is not in focus, causing issues such
as https://github.com/mozilla/geckodriver/issues/394.
This changes the current web content to be selected upon top-level
browsing context navigation and the creation of new sessions.
MozReview-Commit-ID: EgG9gRHtwOA
--HG--
extra : rebase_source : 79c89e2a6d35badf454645bbfb5197a94bb1f980
Commands which are not (yet) supported in chrome context have to throw an
UnsupportedOperationError to indicate that they cannot be used instead of
silently eating failures.
MozReview-Commit-ID: 2eFYAfKaQpD
--HG--
extra : rebase_source : e84c0cde92075a1a5fd91b7e75f0e8c1cace00fa
By the webdriver spec the code has to fail with a NoSuchWindowError if the
active window is no longer present.
MozReview-Commit-ID: HFl7yO5ErRn
--HG--
extra : rebase_source : d170e400c1624e680745e7023041413055ef9bd0
The screenshot code in chrome scope is updated to use the generic capture module,
which is already used for content scope. By that change the code which captures
the canvas makes use of devicePixelRatio now. It means the screenshot will be
scaled depending on the screen configuration, eg. on Andoid this mostly 2.
MozReview-Commit-ID: EBKmJEKVXPQ
--HG--
extra : rebase_source : cd399eb3ee012516b218b9d1a5fd26422ebc9be0
Formerly getElementAttribute() has returned a mix of attributes and
properties. Since getElementProperty() has been added, there is no
need anymore for getElementAttribute() to return conflated data.
MozReview-Commit-ID: 29saWd9PsOX
--HG--
extra : rebase_source : e1dece7586c9b22320db406cfd60d211195f5f18
This change renames the `raisesAccessibilityExceptions` capability to
`moz:accessibilityChecks` to conform with the format of extension
capabilities as defined in the WebDriver specification.
As this feature is not tested or used in the Firefox upgrade tests and
has limited deployment outside Mozilla, it is considered safe for this
to be a breaking change.
MozReview-Commit-ID: DRA16cWJDX0
--HG--
extra : rebase_source : 42fac27f655ce431ae68bbaeeec6a208d91e9033
The payload sent to the listener through `GeckoDriver#sendAsync` is
sometimes mutated if a `commandID` parameter is given. Because `data`
is sometimes a reference to an object, the original object gets modified
with an additional `command_id` field.
To avoid this we copy the object before mutating it and pass it through
to the message manager.
MozReview-Commit-ID: HM2tnPqbAge
--HG--
extra : rebase_source : 6aa593973d82bdf4addd8003ce68df9ad3179a4a