IndexedDB database operations are written such that they must execute
synchronously. For this reason, the add/put operation reads/writes its
Blobs to disk in a synchronous fashion. However, with the introduction
of SendStream-backed Blobs for large (>1 MiB) blobs whose contents are
streamed to the parent replacing nsStringInputStream-backed Blobs
(whose contents were sent up in a single IPC message that might exceed
the size limit and cause a crash), this has no longer been a safe
assumption. However, the problems weren't immediately obvious because
most pre-WASM Blobs are smaller than the 1MiB threshold and even when
they exceeded the size, their memory-backed contents could rapidly be
sent to the parent via IPC, making NS_BASE_STREAM_WOULD_BLOCK errors
rare/hard to reproduce. (rr and its enforced single-threading is a
good way to reproduce, however. Also, see the testing patch on the
bug that introduces artificial delays into SendStream.)
Included SpecialPowersObserver.jsm minor changes to "CreateFiles":
- appendRelativePath is used instead of appendPath because appendPath
only allows a single path component to be appended. In other words,
file creation is limited to files at the root of the profile
directory using appendPath, which is needlessly limiting.
- outStream is now closed even if no data is provided. This is
essential on windows where file deletion only occurs when all handles
are closed. Without this fix, "RemoveFiles" side-effect of deleting
the created files might not take effect until garbage collection runs
and collects the outStream.
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 : 0545382008e874cfeee90fc26ca42ed94ef05b0d
This refactors some of the error logic into a new IniParseError exception. In addition to checking for a 'name' property, we also
check for a 'path' property. This is because some file-like objects coming out of the build system use a 'path' attribute instead
of the standard 'name'.
MozReview-Commit-ID: EXXl9gt1MQk
--HG--
extra : rebase_source : a130824e6724fdef5cf0bd627b19db68ec5fe683
IndexedDB database operations are written such that they must execute
synchronously. For this reason, the add/put operation reads/writes its
Blobs to disk in a synchronous fashion. However, with the introduction
of SendStream-backed Blobs for large (>1 MiB) blobs whose contents are
streamed to the parent replacing nsStringInputStream-backed Blobs
(whose contents were sent up in a single IPC message that might exceed
the size limit and cause a crash), this has no longer been a safe
assumption. However, the problems weren't immediately obvious because
most pre-WASM Blobs are smaller than the 1MiB threshold and even when
they exceeded the size, their memory-backed contents could rapidly be
sent to the parent via IPC, making NS_BASE_STREAM_WOULD_BLOCK errors
rare/hard to reproduce. (rr and its enforced single-threading is a
good way to reproduce, however. Also, see the testing patch on the
bug that introduces artificial delays into SendStream.)
Included SpecialPowersObserver.jsm minor changes to "CreateFiles":
- appendRelativePath is used instead of appendPath because appendPath
only allows a single path component to be appended. In other words,
file creation is limited to files at the root of the profile
directory using appendPath, which is needlessly limiting.
- outStream is now closed even if no data is provided. This is
essential on windows where file deletion only occurs when all handles
are closed. Without this fix, "RemoveFiles" side-effect of deleting
the created files might not take effect until garbage collection runs
and collects the outStream.
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
It should not be possible to close a background tab via the menu shortcut.
Instead another method should be used, best here is the close button.
MozReview-Commit-ID: 3cZmAyPsnj7
--HG--
extra : rebase_source : 83890072d5763bd562bbf69c9ac79c094ae14b84
The wdspec tests in contexts.py already fail silently on linux64
debug. The new actions tests also fail to start a webdriver session,
although only intermittenly. When running the job on a one-click
loaner, I can't tell if it's a browser crash with no crash dump
or a run-time error in wptrunner. Perhaps there's a race wherein
it takes longer to start a Marionette session and wptrunner
starts tests before Marionette is ready, all the tests fail and the
browser gets killed.
MozReview-Commit-ID: FoRbSZOhBUA
--HG--
extra : rebase_source : ef815cce9802deeebf162253e253645b18f82d8a
From changeset de41dae85307ad65523a7dd2e9ae788490860bdc in the
version-control-tools repository. Added without modifications.
This adds automatic retry functionality to hopefully cut down on the
number of intermittent failures related to connectivity problems.
Self reviewing because the extension changes were already peer
reviewed.
MozReview-Commit-ID: 2vMpM2QHExL
--HG--
extra : rebase_source : 82db28bb9751785801c319a4f9c49d24d61d446b
Now the server response isn't sent until the command's Promise is
resolved.
MozReview-Commit-ID: LUdL6mZQ5jE
--HG--
extra : rebase_source : f933e75ca948140a1fd763670b9793b4ff51df67
Now the server response isn't sent until the command's Promise is
resolved.
MozReview-Commit-ID: LUdL6mZQ5jE
--HG--
extra : rebase_source : f933e75ca948140a1fd763670b9793b4ff51df67
Lets skip this test for Fennec. And while doing it we should make use of self.assertIn()
when checking if some characters are contained in a string.
MozReview-Commit-ID: 5qXENTPFkQH
--HG--
extra : rebase_source : d8aa8511c886396ebc71a774b5cdb746ff5b640d
This fixes a regression in bug 1332573 where if no tests are found by the getActiveTests
function, the status variable never gets set. This ensures that we always set status, and
that it will be set to a non-zero return code if any of the calls to runApp fail.
MozReview-Commit-ID: 20M7FcBs0DF
--HG--
extra : rebase_source : d33a1a052986df628a90146e6de29aa415d8a1ad
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
It should not be possible to close a background tab via the menu shortcut.
Instead another method should be used, best here is the close button.
MozReview-Commit-ID: 3cZmAyPsnj7
--HG--
extra : rebase_source : 7bfcae00211b86400e39131187267866c3d4ea25
In case of Fennec the remote profile path has to be used for comparing the moz:profile
capability of Marionette.
MozReview-Commit-ID: 1vHquI0yPmD
--HG--
extra : rebase_source : 1c3a7f3718d683fad8ffb898083ead7af09bbc12
'inline-start' and 'inline-end' are still behind the pref on beta channel
(bug 1253919).
MozReview-Commit-ID: ISI5QYbjf7X
--HG--
extra : rebase_source : ccaec5ff831b645fb150b7e5913c7ad3d10fc2ff
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
To not run into socket failures and forced application shutdown scenarios, the socket timeout
should always be larger then the page load timeout.
MozReview-Commit-ID: EOBW4mozDT1
--HG--
extra : rebase_source : 36cf785311fa7689021a5296dd8aeb9ed3c58a43
Some default values for capabilities as defined by the Webdriver spec do not
match the expectations for Marionette client. Therefore we should add the possibility
to override those defaults in start_session(), but also still allow consumers to
set their own values.
MozReview-Commit-ID: CTUycCRV5kg
--HG--
extra : rebase_source : b333cec564b6c03ee4eee4eb601c30b3c8b9270e
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 : 29ed59fac63b7fb147cd704dfa92e96563979f00
The wdspec tests in contexts.py already fail silently on linux64
debug. After adding the actions tests, which pass, the job turns
orange so let's disable the failing tests for now.
MozReview-Commit-ID: FoRbSZOhBUA
--HG--
extra : rebase_source : b4f4975317db868f36a5ce260cd2eb60c9154b09
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
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
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
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
Previously manifestparser only supported inline comments on conditional keys, such as
skip-if, fails-if, subsuite-if, etc. But on any other key name, inline comments weren't
supported. This was a bad situation because people saw these skip-if comments, and
naturally assumed inline comments worked everywhere. Then they were surprised when things
broke in mysterious ways.
This patch removes the special-casing for skip-if and friends and allows inline comments
everywhere. A caveat to this, is that ' #' is no longer a valid substring in a value.
MozReview-Commit-ID: Hr0BIwzTgaJ
--HG--
extra : rebase_source : f9a042da2137f200434140a7e472df0799f6606d
It turns out there are shockingly few cases of manifestparser manifests that actually use the ';'
character as a comment. Because we will soon allow inline comments, deprecating the use of ';' will
ensure that values are allowed to have semicolons in them.
Even without inline comments, might as well enforce consistency across manifests.
MozReview-Commit-ID: AEPPQFdNXG0
--HG--
extra : rebase_source : 3540fa385f328bffb020c0a6debc4d2b3a90ed39
This is needed because we changed the manifest format to store file hashes for
faster updating. But keeping that up to date requires the manifest to be regenerated
too often so we instead just check for changes to the actual tests that will run.
MozReview-Commit-ID: FYU5Vr6cXwd
--HG--
extra : rebase_source : c0dfd0c83d6a7c14622fbb0b98ad36816fa37a1e
Expand firefox_media_tests.py to include support for twitch.tv tests added to
the external media tests.
Other changes:
- Improve -h docs to mention more clearly available test suites.
- Remove duplate test suite config from platform specific configs. The different
test suites can all be configured the same, independant of platform, so this
has been lifted into the firefox_media_tests.py file to reduce duplication.
- Use symbolic constans for test suite names to avoid magic strings and reduce
risk of typos.
MozReview-Commit-ID: H6Y4wgPUfSk
--HG--
extra : rebase_source : 91ac538f8c035da1a3c6c91b09ce87ecbe8e3a90
Change instances of old style python string interpolation in media test files
to the newer, format() style. format() appears to be the more common style
in the harness code, and this makes the media test code more consistent in
that regard.
MozReview-Commit-ID: JX59EB2EjXH
--HG--
extra : rebase_source : e32798aa5365821b948054c7e9d8a09f8be557fa
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
I recently changed it to function scoped, which was a mistake.
pytest complains if it is not module scoped.
MozReview-Commit-ID: GYP9Ky1avks
--HG--
extra : rebase_source : ad96a48fe19c987f3021225f11875d6e80858ccf
It is required to skip certain WebDriver tests imperatively at runtime,
such as for the Get Window Size and Get Window Position commands, which
are only available at certain configurations.
MozReview-Commit-ID: 9ERYkYm34iI
--HG--
extra : rebase_source : e30e2fa1473e25511dcec0361ad4a7eecce04e67
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
This patch makes it possible to collect code coverage for xpcshell tests using the linux64-jsdcov build. It also enables the use of a 'coverage' flag to disable tests when they are instrumented with the js debugger for code coverage. Lastly, it uses the 'coverage' flag to disable certain tests.
MozReview-Commit-ID: 97VFkJmlwQn
--HG--
extra : rebase_source : 26c841f5a68f927889c0903e701bfde4b7ca84ac
This patch first implements an iterator so that we can properly iterate over the elements of the object returned by the _getMethodNames function. Next, the recordTestCoverage function now checks to see if the file actually has methods before recording them. And finally, some formatting was done.
MozReview-Commit-ID: EPOeYlMBc0w
--HG--
extra : rebase_source : c2145303916189804ba6ff31ede9310ab63d5104
Fennec uses a different set of DTD and properties files. As such the current
entity and property names do not work. To fix the tests a DTD and properties
file gets added for the test_dialog.xul example dialog, which means that we
have identical resources for every supported application.
MozReview-Commit-ID: LXDeADHlxja
--HG--
extra : rebase_source : 47a4023af8ebaef28ca58868529df5e78ea7b309
Needed to support beetmover and balrog.
ToDo: attribute this cset to changes on date.
MozReview-Commit-ID: 430QCIe7tM7
--HG--
extra : rebase_source : c23b9311f0b897884aac7aafa9a84463655957c5