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

2270 Коммитов

Автор SHA1 Сообщение Дата
Andreas Tolfsen 528d9653a3 Bug 1319237 - Lower timeout elapse evaluation count; r=me a=followup-to-prevent-back out
Although low, 150 evaluations appears to cause intermittents with on
slow try environments, such as Android emulators.

Since the purpose of this test is to check that the timeout elapses
properly, we are not reducing quality by testing for a lower number
of evaluations.

MozReview-Commit-ID: KqOTARg1AHP

--HG--
extra : rebase_source : b10f0b066ce6201c07c5e7b40ebc32e60698374c
2017-02-13 12:02:01 -08:00
David Burns 07d305012c Bug 1078237: Reenable frame switching test on Windows. r=whimboo
MozReview-Commit-ID: DCMR20NYzfW

--HG--
extra : rebase_source : 625813c1ffeb09e0b5e35b97d9a281834795afc4
2017-02-10 16:05:42 +00:00
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 89061b661b Bug 1319237 - Improve window position test assertions; r=maja_zf
MozReview-Commit-ID: qmFS0JEqx3

--HG--
extra : rebase_source : 7419ccead4acb2d4e5fad3770273a562cfc11298
2017-02-02 14:57:19 +00:00
Andreas Tolfsen c31fc4009e Bug 1319237 - Donate window position test to Mozilla; r=automatedtester
The window positioning test has been sufficiently rewritten that it can
no longer be considered a derived work from Selenium.

MozReview-Commit-ID: 9FtGEPeMXQs

--HG--
extra : rebase_source : e8498b9650af581f1139506b2700468d8d4a8ee7
2017-02-02 14:46:58 +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 645c6db1b0 Bug 1319237 - Generalise wait condition utility; r=automatedtester,maja_zf
This makes the `implicitWaitFor` utility from
testing/marionette/element.js generally available in Marionette.

It improves on the design of the old wait utility by providing
promise-like resolve and reject options to the evaluated function.  These
can be used to indicate success or failure of waiting.  If resolved, the
provided value is returned immediately.  When rejected, the function is
evaluated over again until the timeout is reached or an error is thrown.

It is useful to indicate success and failure state because it saves the
calling code from guessing based on the return value.  Guessing from
the return value can be problematic since there are certain types and
values in JavaScript that are ambigeous or misleading, such as the fact
that empty arrays are evaluated as a truthy value.

MozReview-Commit-ID: G8F99tdbiNb

--HG--
extra : rebase_source : 88647b1c7115f15649d5029391ff21567f9d527c
2016-11-21 23:41:20 +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
Tooru Fujisawa 44f45bf316 Bug 1338257 - Remove remaining legacy generator from testing/marionette/. r=ato 2017-02-11 11:47:57 +09:00
Andrea Marchesini 8cf1cb8c2f Bug 1335536 - File.createFromNsIFile and File.createFromFileName should be async - part 1 - tests, r=smaug 2017-02-08 10:18:32 +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 295a461256 Bug 1322862 - Wait for forward- and back commands to complete; r=maja_zf
The Back and Forward commands are meant to be synchronous and this
works around the problem of intermittents on slow try machines until
bug 1330348 is fixed.

For some reason, the preceding patches make script evaluation quicker
and makes navigating back and forward less racy.

MozReview-Commit-ID: GRcgMp1Rc6N

--HG--
extra : rebase_source : a801987d0c29b9a426bfe45547e24b84f981219b
2017-02-02 14:08:52 +00:00
Andreas Tolfsen 3b23c27466 Bug 1322862 - Compare unicode strings in Python test; r=whimboo
It has been known to happen that Python occassionally trips up string
comparison on Windows and that this is causing intermittent issues.
This patch uses unicode strings consistently so that this should not
occur.

MozReview-Commit-ID: BAdHfiLZzuQ

--HG--
extra : rebase_source : 734c37430d6bd2b00c0ac10bdfba6af5db0f1242
2017-01-03 18:45:35 +00:00
Andreas Tolfsen 5a917f7627 Bug 1322862 - Make __webDriverArguments et al. content safe; r=automatedtester
Properties created in a more privileged scope than content cause
permission denied errors when they are accessed from a less privileged
scope.  This is the case when we assign a document unload handler from
chrome to a sandbox with content privileges.  A permission denied error
will be thrown if this handler is inspected from the code evaluated
inside the sandbox.

By cloning the properties along with their functions and wrapping their
reflectors, we can ensure they can be safely inspected from content.

MozReview-Commit-ID: Hy5MYvdTsv8

--HG--
extra : rebase_source : 068cd67f3bc6f99c312303c4682c47cd9c5143d7
2016-12-10 16:15:53 -10:00
Andreas Tolfsen d9f19d9e12 Bug 1336124 - Only delete session if one exists when testing capabilities; r=maja_zf
MozReview-Commit-ID: IEqHzADUQow

--HG--
extra : rebase_source : a11c327457e0710372ab27e2451ddab209c19fc3
2017-02-03 16:53:31 +00:00
Andreas Tolfsen 83ee2de5d4 Bug 1336124 - Return error when there is no session; r=maja_zf
Returns an invalid session id error when there is no current session
and the requested command is not newSession.

MozReview-Commit-ID: Dnu2PXDmeaG

--HG--
extra : rebase_source : eea9c024f5d0c42cdf1d73918e80ebf0e22fee1d
2017-02-02 16:15:31 +00: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 73f85ac684 Bug 1336124 - Add assert.session for checking if session is active; r=maja_zf
MozReview-Commit-ID: CmHFag2q1V2

--HG--
extra : rebase_source : 526e01466ce4a00a091dd88cb060d166c6ac4245
2017-02-02 16:09:14 +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 67b13af80f Bug 1319237 - Improve window position test assertions; r=maja_zf
MozReview-Commit-ID: qmFS0JEqx3

--HG--
extra : rebase_source : 0dbe47bca42fa6e5a74782f85b62b972890dfc3e
2017-02-02 14:57:19 +00:00
Andreas Tolfsen 3710039101 Bug 1319237 - Donate window position test to Mozilla; r=automatedtester
The window positioning test has been sufficiently rewritten that it can
no longer be considered a derived work from Selenium.

MozReview-Commit-ID: 9FtGEPeMXQs

--HG--
extra : rebase_source : 3ca3861b81f3139427a6ec0adabf8ae4c0c8a3c7
2017-02-02 14:46:58 +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 8856da4c0b Bug 1319237 - Generalise wait condition utility; r=automatedtester,maja_zf
This makes the `implicitWaitFor` utility from
testing/marionette/element.js generally available in Marionette.

It improves on the design of the old wait utility by providing
promise-like resolve and reject options to the evaluated function.  These
can be used to indicate success or failure of waiting.  If resolved, the
provided value is returned immediately.  When rejected, the function is
evaluated over again until the timeout is reached or an error is thrown.

It is useful to indicate success and failure state because it saves the
calling code from guessing based on the return value.  Guessing from
the return value can be problematic since there are certain types and
values in JavaScript that are ambigeous or misleading, such as the fact
that empty arrays are evaluated as a truthy value.

MozReview-Commit-ID: G8F99tdbiNb

--HG--
extra : rebase_source : 1de77b97f0de71e0dc77fc47a6b1aab1ef88ea6f
2016-11-21 23:41:20 +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 97e1ca8fbf Bug 1322277 - Default socket timeout has to be larger than the default page load timeout. r=ato
Until we can remove the socket timeout parameter it has to be set a default value which
is larger than the longest timeout as defined by the WebDriver spec. In that case it's
300s for page load. Also add another minute so that slow running builds have enough time
to send the timeout error to the client.

MozReview-Commit-ID: EOBW4mozDT1

--HG--
extra : rebase_source : 51031bad39ea0cc08a5b03024dc4362974c638ce
2017-02-06 13:11:38 +01:00
Henrik Skupin 3c90228249 Bug 1322277 - Fix usage of capabilities in start_session. r=ato
Capabilities as passed into start_session() can be desiredCapabilities
and requiredCapabilities. As such the parameter name should be clear.

MozReview-Commit-ID: GPNv4g9HMO2

--HG--
extra : rebase_source : f837873c2d663e5540cb0a4327f6bb90243b1cb5
2017-02-06 13:03:18 +01:00
Ryan VanderMeulen b2963d0f81 Backed out 3 changesets (bug 1322277) for causing bug 1334149.
Backed out changeset 4dcb65842657 (bug 1322277)
Backed out changeset 35d9f271da8d (bug 1322277)
Backed out changeset 55cc36b0d408 (bug 1322277)
2017-02-05 14:22:49 -05:00
Sebastian Hengst bb10d0e8fd Backed out changeset 0d31bc70ba46 (bug 1322862) for frequent failures in test_navigation.py. r=backout 2017-02-01 23:34:51 +01:00
Sebastian Hengst e5c4000299 Backed out changeset 38d9a0fa515a (bug 1322862) 2017-02-01 23:34:17 +01:00
Andreas Tolfsen 6e0bec5415 Bug 1322862 - Compare unicode strings in Python test; r=whimboo
It has been known to happen that Python occassionally trips up string
comparison on Windows and that this is causing intermittent issues.
This patch uses unicode strings consistently so that this should not
occur.

MozReview-Commit-ID: BAdHfiLZzuQ

--HG--
extra : rebase_source : 3f999026456315f6e61e4717a8c58ef32f8f53ab
2017-01-03 18:45:35 +00:00
Andreas Tolfsen 3d6b2cd7e2 Bug 1322862 - Make __webDriverArguments et al. content safe; r=automatedtester
Properties created in a more privileged scope than content cause
permission denied errors when they are accessed from a less privileged
scope.  This is the case when we assign a document unload handler from
chrome to a sandbox with content privileges.  A permission denied error
will be thrown if this handler is inspected from the code evaluated
inside the sandbox.

By cloning the properties along with their functions and wrapping their
reflectors, we can ensure they can be safely inspected from content.

MozReview-Commit-ID: Hy5MYvdTsv8

--HG--
extra : rebase_source : e3932ebef3a32c5873b98726525dbf0817d8a614
2016-12-10 16:15:53 -10:00
Andrew Halberstadt 1abba2da72 Bug 1334209 - Activate mozharness virtualenv in-process from one click loaner mach commands, r=jmaher
Previously the run-wizard script would add a command to source the virtualenv in ~/.bashrc after
mozharness finished setting things up. This is fragile, assumes people are using bash, etc. Plus
it appeared to intermittently fail for some users.

Instead, this activates the virtualenv directly from individual mach commands that need it. This
guarantees we will always be using the virtualenv if required (and won't be using it if not). The
'activate_this.py' script is invoked the same way that we do it for in-tree mach commands:
https://dxr.mozilla.org/mozilla-central/rev/9c06e744b1befb3a2e2fdac7414ce18220774a1d/python/mozbuild/mozbuild/virtualenv.py#456

MozReview-Commit-ID: CfcoiVJXQTl

--HG--
extra : rebase_source : da01d1ce1bd9b41c89922e989f857c4de8c09341
2017-01-31 11:53:36 -05:00
Maja Frydrychowicz 74f50780ba Bug 1335240 - actions.InputState does not record correct type for key and pointer; r=ato
MozReview-Commit-ID: 9RW0BretWU5

--HG--
extra : rebase_source : 22a542c35f01665cb2a4157df1fd0c6b96a6d980
2017-02-01 13:30:58 -05: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
Henrik Skupin f9498eb779 Bug 1333803 - Revert setting of the update channel to modifying channel-prefs.js. r=maja_zf
As it has been turned out setting the desired update channel via a preference
on the default branch does not work. Instead it really has to be set in the
channel-prefs.js file.

If not done so, the updater will see the new channel as invalid and abort the
update process.

MozReview-Commit-ID: 6NqYaijAcsX

--HG--
extra : rebase_source : 31f3da79c960ca68b715df4b7cf70e4d486a2281
2017-01-30 17:05:27 +01:00
Henrik Skupin 6a7758630c Bug 1333736 - Disable usage of new tab page by default. r=maja_zf
Now that Marionette can load about:blank multiple times right after each
other there is no need to prevent using it when turning of the new tab page.

test_about_blank_for_new_docshell can also be updated by using a new tab for
the test. This also gives us a new docshell and can also be run for Fennec.

MozReview-Commit-ID: GWxtsH3nQt

--HG--
extra : rebase_source : 83105159cb01110a3d4cb1895fc076f09187bf73
2017-01-25 14:50:24 +01:00
Carsten "Tomcat" Book dca07ffc3a merge mozilla-central to mozilla-inbound 2017-01-27 11:16:17 +01:00
Florian Quèze b11907c7aa Bug 1334156 - script-generated patch to replace .ownerDocument.defaultView with .ownerGlobal, r=jaws. 2017-01-27 10:51:03 +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
Henrik Skupin c0f4df09f0 Bug 1323185 - Skip unit tests which should not be run with Fennec. r=maja_zf
MozReview-Commit-ID: 5aiuT7vlm3f

--HG--
extra : rebase_source : 3af4465da67e0df764b9ece1fd45e20de4992f57
2017-01-17 16:35:22 +01:00
Maja Frydrychowicz 320a29e888 Bug 1328726 - Make performActions and releaseActions blocking; r=ato
Now the server response isn't sent until the command's Promise is
resolved.

MozReview-Commit-ID: LUdL6mZQ5jE

--HG--
extra : rebase_source : f933e75ca948140a1fd763670b9793b4ff51df67
2017-01-11 10:26:22 -05:00
Maja Frydrychowicz 259f6b6eda Bug 1328726 - Style fix ups in Marionette key actions implementation; r=ato
These are leftover from review of Bug 1320389. I must have forgotten to
re-push to MozReview.

MozReview-Commit-ID: ENTFdmCsv6I

--HG--
extra : rebase_source : 3c6961fb1826cb7cc00d1bd6048ed2c94c9a2f1a
2017-01-04 17:48:11 -05:00