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

315 Коммитов

Автор SHA1 Сообщение Дата
Andreas Tolfsen ec579b1aca Bug 1319237 - Avoid reposition waiting if position is unchanged; r=maja_zf
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
2017-02-02 14:58:36 +00:00
Andreas Tolfsen 3cfd9442a2 Bug 1319237 - Make GeckoDriver#setWindowSize synchronous; r=automatedtester,maja_zf
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
2016-11-21 23:44:22 +01:00
Andreas Tolfsen 83dd4e584b Bug 1319237 - Make GeckoDriver#setWindowPosition synchronous; r=automatedtester
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
2016-11-21 23:43:35 +01:00
Andreas Tolfsen bb28ec2d64 Bug 1319237 - Assign GeckoDriver#getWindowSize return value in one statement; r=automatedtester
MozReview-Commit-ID: BGH1WkgH91p

--HG--
extra : rebase_source : ed166d858412698e320555c5485d2bfb9b4173b1
2016-11-21 23:36:29 +01:00
Andreas Tolfsen 8096c7c75d Bug 1319237 - Calculate correct window position; r=automatedtester
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
2016-11-21 23:33:03 +01:00
Sebastian Hengst 94a3198643 Backed out changeset deb5b08545fd (bug 1322383) for frequently failing to find windows in wpt tests on Windows. r=backout
--HG--
rename : testing/marionette/harness/marionette_harness/tests/unit/test_window_type_chrome.py => testing/marionette/harness/marionette_harness/tests/unit/test_window_type.py
2017-02-09 18:13:02 +01:00
Sebastian Hengst 6d9561e0ba Backed out changeset f5e6da82e68d (bug 1322383) 2017-02-09 18:10:13 +01:00
Henrik Skupin 14cf73d88f Bug 1322383 - getCurrentWindow() has to only return the currently selected window. r=ato,maja_zf
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
2017-02-08 12:58:45 +01:00
Henrik Skupin f681f14f4f Bug 1322383 - Add missing checks for valid window r=ato
MozReview-Commit-ID: Ad67SPx8vBx

--HG--
rename : testing/marionette/harness/marionette_harness/tests/unit/test_window_type.py => testing/marionette/harness/marionette_harness/tests/unit/test_window_type_chrome.py
extra : rebase_source : 16bcd69d1906d8f2a544fd441cac2ff59634a5a1
2017-02-03 17:49:38 +01:00
Wes Kocher 10665c1427 Backed out 14 changesets (bug 1319237) for android xpcshell failures a=backout
Backed out changeset c85849b790c5 (bug 1319237)
Backed out changeset 9746878e5fc7 (bug 1319237)
Backed out changeset 1f7f75c57c59 (bug 1319237)
Backed out changeset 4dc796bbcfaa (bug 1319237)
Backed out changeset f8449c471b8f (bug 1319237)
Backed out changeset f2bdf078f39a (bug 1319237)
Backed out changeset 8df8cda56942 (bug 1319237)
Backed out changeset f651a9e54a57 (bug 1319237)
Backed out changeset 76c8aafbd933 (bug 1319237)
Backed out changeset a2096fa29cd7 (bug 1319237)
Backed out changeset af71a9376bef (bug 1319237)
Backed out changeset 778721edd8b9 (bug 1319237)
Backed out changeset feaf6ba3bd9a (bug 1319237)
Backed out changeset f5f206ed675b (bug 1319237)

MozReview-Commit-ID: EpmToL8Xqfz
2017-02-06 11:28:28 -08:00
Andreas Tolfsen 71f7f26e21 Bug 1336124 - Rename sessionTeardown to deleteSession; r=maja_zf
MozReview-Commit-ID: F1jPkzL3zwU

--HG--
extra : rebase_source : b10eff8f379180e1ea15e60ae9c3f937c3b89690
2017-02-02 16:11:08 +00:00
Andreas Tolfsen 8bddc8ca93 Bug 1336124 - Remove unused B2G code in session teardown; r=maja_zf
MozReview-Commit-ID: CHmdB7BvBT8

--HG--
extra : rebase_source : 6d3eef73f21bdf68d60dc572ad4133e5bae7287c
2017-02-02 16:10:18 +00:00
Andreas Tolfsen 23828a2bad Bug 1319237 - Avoid reposition waiting if position is unchanged; r=maja_zf
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
2017-02-02 14:58:36 +00:00
Andreas Tolfsen f92eb33723 Bug 1319237 - Make GeckoDriver#setWindowSize synchronous; r=automatedtester
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
2016-11-21 23:44:22 +01:00
Andreas Tolfsen e0f2292764 Bug 1319237 - Make GeckoDriver#setWindowPosition synchronous; r=automatedtester
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
2016-11-21 23:43:35 +01:00
Andreas Tolfsen f9138110ea Bug 1319237 - Assign GeckoDriver#getWindowSize return value in one statement; r=automatedtester
MozReview-Commit-ID: BGH1WkgH91p

--HG--
extra : rebase_source : c28ac11491968aeaba0e6b5e7f4fbb14e7c12d55
2016-11-21 23:36:29 +01:00
Andreas Tolfsen a4ab722fe8 Bug 1319237 - Calculate correct window position; r=automatedtester
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
2016-11-21 23:33:03 +01:00
Henrik Skupin 19c8f94a8d Bug 1336445 - Don't select the first tab if switch_to_window() is called with a chrome window handle. r=ato
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
2017-02-05 15:55:10 +01:00
Henrik Skupin 67f7bcffac Bug 1124604 - Add `focus` parameter to switch_to_window(). r=ato
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
2017-01-30 15:35:16 +01:00
Henrik Skupin c94676c778 Bug 1124604 - Move code for getting the outer window id into its own method. r=ato
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
2017-01-27 09:09:32 +01:00
Florian Quèze be4dbae285 Bug 1334199 - script-generated patch to omit getComputedStyle's second argument when it's falsy, r=jaws. 2017-01-27 10:51:02 +01:00
Henrik Skupin 2ae40d84a9 Bug 1323185 - Add window (tab) handling support for Fennec. r=ato
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
2017-01-26 16:42:35 +01:00
Wes Kocher f4f02100c8 Backed out 3 changesets (bug 1323185) for Mn bustage a=backout CLOSED TREE
Backed out changeset 2aa7604fbaaf (bug 1323185)
Backed out changeset 5b6ffae33504 (bug 1323185)
Backed out changeset ae6657776fe0 (bug 1323185)

MozReview-Commit-ID: 44EXnjm4RPt

--HG--
rename : testing/marionette/harness/marionette_harness/tests/unit/test_window_handles_content.py => testing/marionette/harness/marionette_harness/tests/unit/test_window_handles.py
2017-01-24 12:51:08 -08:00
Henrik Skupin fa96c2f9f9 Bug 1323185 - Add window (tab) handling support for Fennec. r=ato
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
2017-01-23 08:46:50 +01:00
Henrik Skupin 547a6ff1fa Bug 1311350 - Make close window commands synchronous and return remaining window handles. r=ato
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
2017-01-10 16:36:49 +01:00
Andreas Tolfsen 180328b651 Bug 1326534 - Rename sessionCapabilities variable for brevity; r=whimboo
MozReview-Commit-ID: KGYk2CgwERy

--HG--
extra : rebase_source : b1090c3de72ae61696522c47849da269bea90fb8
2016-12-31 12:32:14 +00:00
Andreas Tolfsen 2c29d0b5e6 Bug 1326534 - Reset session capabilities state on teardown; r=whimboo
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
2016-12-31 12:28:19 +00:00
Andreas Tolfsen c67cbf8a8c Bug 1326534 - Deploy WebDriver conforming capabilities in Marionette; r=automatedtester,maja_zf,whimboo
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
2016-12-31 12:27:13 +00:00
Andreas Tolfsen 9a4394f2c5 Bug 1326534 - Lint a few statements in driver.js; r=automatedtester
No functional changes.

MozReview-Commit-ID: FP9p9tPr8Ce

--HG--
extra : rebase_source : fb3e43203b417b119df2c0975c15aa95c1b16408
2016-12-30 12:43:36 +00:00
Henrik Skupin 3f2001d14f Bug 1326047 - Skip unit tests which rely on an instance but Marionette doesn't manage the process. r=ato,maja_zf
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
2017-01-04 13:04:55 +01:00
Andreas Tolfsen a6470e1da2 Bug 1328676 - Focus web content on starting new session and navigating; r=automatedtester
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
2017-01-04 19:38:34 +00:00
Andreas Tolfsen 2d255984aa Bug 1213875 - Add ability to not scroll into view element on screen capture; r=whimboo
Implements a `scroll` argument for choosing the scroll into view behaviour
when taking screen captures of elements.

https://w3c.github.io/webdriver/webdriver-spec.html#take-element-screenshot

MozReview-Commit-ID: BOKBrKqQ916

--HG--
extra : rebase_source : 290f9a6a7c64c0f2932128679a84044138d96b6c
2016-12-20 14:30:48 +00:00
Henrik Skupin 29c4ebd2b3 Bug 1326174 - For unsupported commands in chrome context throw UnsupportedOperationError r=ato
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
2016-12-29 14:04:16 +01:00
Henrik Skupin f68eddf3dd Bug 1243415 - Check for a valid DOMWindow for screenshot in chrome scope. r=automatedtester
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
2016-12-07 21:47:44 +01:00
Henrik Skupin c4fb446f19 Bug 1243415 - Add support to take full screenshots in chrome scope. r=automatedtester
MozReview-Commit-ID: 1FmWTEZzt7

--HG--
extra : rebase_source : 34ba86cdfcd400eb4f268a0b3d17be95b2f71c3d
2016-12-07 17:38:14 +01:00
Henrik Skupin e4153d09c5 Bug 1243415 - Add hash format support for screenshots in chrome scope. r=automatedtester
MozReview-Commit-ID: Dp0vDyYTzX1

--HG--
extra : rebase_source : cf24b8e2a0768d65b420ebeef7ef08e1d553f4f8
2016-12-05 23:06:36 +01:00
Henrik Skupin 31b8911b4b Bug 1243415 - Add highlighting of elements for screenshots in chrome scope. r=ato,automatedtester
MozReview-Commit-ID: 317tqZWwdQf

--HG--
extra : rebase_source : 8e2af4bd68d619ee3e8f19e68dc8e07119d923c4
2016-12-05 21:19:46 +01:00
Henrik Skupin 260407fb18 Bug 1243415 - Make use of capture.js in chrome scope. r=automatedtester
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
2016-12-28 14:13:31 +01:00
Henrik Skupin 468d519037 Bug 1243415 - Remove B2G related code from screenshot methods. r=automatedtester
MozReview-Commit-ID: 1C0XXOX2zuf

--HG--
extra : rebase_source : 83861ee3f4527dd1bfbe9311a67c1302b42a17c6
2016-12-05 18:37:50 +01:00
Henrik Skupin 26107073d9 Bug 1277090 - getElementAttribute() has to only return attributes. r=ato
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
2016-12-14 22:26:34 +01:00
Maja Frydrychowicz 5095f8b5b8 Bug 1320389 - Implement dispatch of key actions in content context; r=ato
MozReview-Commit-ID: AxHTFdDtXJN

--HG--
extra : rebase_source : 0d12a5f56bcd05d0eccb8aa794779002f555e62d
2016-12-13 18:29:48 -05:00
Maja Frydrychowicz cfb8c694b7 Bug 1320389 - Rename legacyactions; r=ato
MozReview-Commit-ID: 7fImbYQsvJh

--HG--
extra : rebase_source : 2242fabb0e617df7c0d1a65eeadcb194e45a9cae
2016-11-29 11:00:52 -05:00
Andreas Tolfsen 892dd1cb42 Bug 1324529 - Rename Marionette capability raisesAccessibilityExceptions to moz:accessibilityChecks; r=whimboo,yzen
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
2016-12-19 19:28:17 +00:00
Andreas Tolfsen 8ff4e83b8c Bug 1324467 - Make copy of data to send to listener; r=automatedtester
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
2016-12-19 19:08:46 +00:00
Henrik Skupin a2a8f73530 Bug 1323451 - Fix test failures in test_navigation.py for Fennec. r=ato
MozReview-Commit-ID: 9YmBJIp0vAJ

--HG--
extra : rebase_source : d58536432a9271ac197ec6838e08785a42d8ecf6
2016-12-15 17:00:20 +01:00
Carsten "Tomcat" Book c78316b55c Backed out changeset 7ec63ef95514 (bug 1243415) 2016-12-16 12:32:25 +01:00
Carsten "Tomcat" Book 1c5c762785 Backed out changeset 1a07b3fcb30b (bug 1243415) 2016-12-16 12:32:23 +01:00
Carsten "Tomcat" Book 1adf9f3831 Backed out changeset 62c28040b388 (bug 1243415) 2016-12-16 12:32:21 +01:00
Carsten "Tomcat" Book 3dba61aa37 Backed out changeset b7e547b2f592 (bug 1243415) 2016-12-16 12:32:19 +01:00
Carsten "Tomcat" Book d34872123d Backed out changeset f108db686ca2 (bug 1243415) 2016-12-16 12:32:17 +01:00