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

294 Коммитов

Автор SHA1 Сообщение Дата
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
Carsten "Tomcat" Book d6aef7b832 Backed out changeset 4bd98277bf9e (bug 1243415) 2016-12-16 12:32:15 +01:00
Henrik Skupin 53c4ccf6d0 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 : 8d8271751a4cffdf4e74d4e66ff71588e7d2a01e
2016-12-07 21:47:44 +01:00
Henrik Skupin 42387e6802 Bug 1243415 - Add support to take full screenshots in chrome scope. r=automatedtester
MozReview-Commit-ID: 1FmWTEZzt7

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

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

--HG--
extra : rebase_source : e3e4db9ee1358be0abdac8e4a6150c81c377f4d3
2016-12-05 21:19:46 +01:00
Henrik Skupin 685e8274c6 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 : 3d177eeac4935660f43727a20445a39fe78a2c45
2016-12-09 20:47:21 +01:00
Henrik Skupin de9d9c65b4 Bug 1243415 - Remove B2G related code from screenshot methods. r=automatedtester
MozReview-Commit-ID: 1C0XXOX2zuf

--HG--
extra : rebase_source : 6bd4aee0559e3a6be9bec4eb9b3103ef51a1371c
2016-12-05 18:37:50 +01:00
Gijs Kruitbosch 359efd2e81 Bug 1322609 - use getTabBrowser() instead of a type attribute check in marionette, r=ato
MozReview-Commit-ID: 9iIJyGgoJRU

--HG--
extra : rebase_source : c883354c3fc4de494981049734c60128c737913a
2016-12-09 10:55:25 -10:00
Carsten "Tomcat" Book 877ffa1db2 merge mozilla-inbound to mozilla-central a=merge 2016-12-15 14:17:53 +01:00
Tooru Fujisawa fe45e321da Bug 1321228 - Part 1: Remove legacy generator from testing/marionette/. r=ato 2016-12-15 16:54:46 +09:00
Iris Hsiao 952b00179f Backed out changeset 837d6a698a1b (bug 1277090)
CLOSED TREE
2016-12-15 09:38:20 +08:00
Henrik Skupin 09c425f5fe 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 : c98ba2bd30afbd794198e5cc9697f5d2e7050317
2016-12-14 22:26:34 +01:00
Henrik Skupin 90f79a0758 Bug 1311657 - Switch to top-most frame first before closing chrome window. r=ato
MozReview-Commit-ID: 9Jf2gD1velz

--HG--
extra : rebase_source : 169f99160fa368b03c2445e4db5d64c841896c84
2016-12-13 21:36:56 +01:00
Thomas Charles acf2f9d4dd Bug 1316975 - Correct function definition style in Marionette components; r=ato
No functional changes.

MozReview-Commit-ID: 25cWAnpRB9H

--HG--
extra : rebase_source : c8b14bf47a476488568f54d3640b51bbeed5b04b
2016-12-04 12:42:52 +01:00
Henrik Skupin 36bf5256de Bug 1320919 - Remove deprecated Marionette and Selenium 2 compatibility commands. r=ato
MozReview-Commit-ID: 3n8qD1gJ23n

--HG--
extra : rebase_source : fc993173743fdd5feda48e8877a38b2ef45e4328
2016-12-02 13:44:12 +01:00
Andreas Tolfsen 2a68e4a0f8 Bug 1321278 - Return profile directory in capabilities; r=whimboo
This introduces a new capability, `moz:profile`, which contains the path
to the currently used profile directory.

MozReview-Commit-ID: FKF4Hde3tF9

--HG--
extra : rebase_source : 207fce0eec9c74eb4d1218f0f088e6a05ae7a7ba
2016-11-30 14:56:34 +00:00
Andreas Tolfsen 41c8bcea79 Bug 1321278 - Rename processId capability to moz:processID; r=whimboo
The WebDriver specification says that any proprietary capabilities
should be defined as so called extension capabilities, which means we
must prefix them with `moz:`.

Even though the `processId` capability is removed, this change is
backwards compatible because a new property `Marionette.process_id`
is introduced that looks for `moz:processID` and `processId` in order
when starting a new session.

MozReview-Commit-ID: ChkC6QTklzC

--HG--
extra : rebase_source : cffa52b1e6407edaf91bb21afebaa441a208f705
2016-11-30 14:11:31 +00:00
Andreas Tolfsen da6234665e Bug 1103196 - Add ability to ignore invalid TLS certificates; r=automatedtester,keeler,mossop
When the `acceptInsecureCerts` capability is set to true on creating
a new Marionette session, a `nsICertOverrideService` override service
is installed that causes all invalid TLS certificates to be ignored.
This is in line with the expectations of the WebDriver specification.

It is worth noting that this is a potential security risk and that this
feature is only available in Gecko when the Marionette server is enabled.

MozReview-Commit-ID: BXrQw17TgDy

--HG--
extra : rebase_source : 023f18b07ffbb53c7dbc588a823c62830f032e3d
2016-11-06 18:03:31 +00:00
Andreas Tolfsen 5c6b5dd771 Bug 1103196 - Error on encountering invalid certificate; r=automatedtester
When arriving at a document which baseURI starts with `about:certerror`
will cause Marionette to now return `error.InsecureCertificateError`.
This is mandated by the WebDriver specification.

This does, however, mark a non-backwards compatible change in Marionette.
It is assumed we will be able to mitigate this change in error type as
few consumers, if any, rely on the more generic type considering we did
not support invalid TLS certificates prior to this push.

MozReview-Commit-ID: JcIMvCXimB

--HG--
extra : rebase_source : 5e2dffe8e5d16ae3fe407ed42c43d52b49e3741d
2016-11-06 18:01:23 +00:00
Andreas Tolfsen 6482c0f79b Bug 1103196 - Remove non-conformant acceptSslCerts capability; r=automatedtester
`acceptSslCerts` has been replaced by `acceptInsecureCerts`.

MozReview-Commit-ID: 79KbRoQb1dW

--HG--
extra : rebase_source : 1c0e4fcb468d5c196351cb21715804c98b5fef02
2016-11-06 17:59:42 +00:00
Andreas Tolfsen 121372c21a Bug 1103196 - Add acceptInsecureCerts capability; r=automatedtester
Reads the `acceptInsecureCerts` capability and sets the session state.

MozReview-Commit-ID: KVErmdxwXQB

--HG--
extra : rebase_source : 50ce229909cfc9a407fdadc593b57a9545342723
2016-11-01 18:07:24 +00:00