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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Now the server response isn't sent until the command's Promise is
resolved.
MozReview-Commit-ID: LUdL6mZQ5jE
--HG--
extra : rebase_source : f933e75ca948140a1fd763670b9793b4ff51df67
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