This change is mostly straightforward, except for the following.
- It removes all the printing from the do_check_* macros because gtest macros
do appropriate printing.
- test_StatementCache.cpp needs some special gtest magic for the type
parameterization.
- It merges the four tests in test_unlock_notify.cpp because they rely on being
executed in order, and so aren't independent.
- storage_test_harness_tail.h is no longer necessary because gtest provides the
test looping functionality.
- It uses #include and the preprocessor to remove the duplication between
test_deadlock_detector.cpp and xpcom/tests/DeadlockDetector.cpp.
- It makes the test in test_service_init_background_thread.cpp a death test to
force it to be the first storage gtest, because it fails otherwise.
- It adds code to undo the SQLite mutex hooking as necessary, so that tests
don't interfere with each other.
- It de-virtualizes Spinner's destructor (as identified in bug 1318282).
--HG--
rename : storage/test/storage_test_harness.h => storage/test/gtest/storage_test_harness.h
rename : storage/test/test_AsXXX_helpers.cpp => storage/test/gtest/test_AsXXX_helpers.cpp
rename : storage/test/test_StatementCache.cpp => storage/test/gtest/test_StatementCache.cpp
rename : storage/test/test_asyncStatementExecution_transaction.cpp => storage/test/gtest/test_asyncStatementExecution_transaction.cpp
rename : storage/test/test_async_callbacks_with_spun_event_loops.cpp => storage/test/gtest/test_async_callbacks_with_spun_event_loops.cpp
rename : storage/test/test_binding_params.cpp => storage/test/gtest/test_binding_params.cpp
rename : storage/test/test_deadlock_detector.cpp => storage/test/gtest/test_deadlock_detector.cpp
rename : storage/test/test_file_perms.cpp => storage/test/gtest/test_file_perms.cpp
rename : storage/test/test_mutex.cpp => storage/test/gtest/test_mutex.cpp
rename : storage/test/test_service_init_background_thread.cpp => storage/test/gtest/test_service_init_background_thread.cpp
rename : storage/test/test_statement_scoper.cpp => storage/test/gtest/test_statement_scoper.cpp
rename : storage/test/test_transaction_helper.cpp => storage/test/gtest/test_transaction_helper.cpp
rename : storage/test/test_true_async.cpp => storage/test/gtest/test_true_async.cpp
rename : storage/test/test_unlock_notify.cpp => storage/test/gtest/test_unlock_notify.cpp
extra : rebase_source : dbb695c112564efa1945116be1a8435988982e74
This deprecates PYTHON_UNIT_TESTS and replaces it with PYTHON_UNITTEST_MANIFESTS.
In the build system, this means python unittests will be treated the same as all
other test suites that use manifestparser. New manifests called 'python.ini' have
been created for all test directories containing python unittests.
MozReview-Commit-ID: IBHG7Thif2D
--HG--
extra : rebase_source : 11a92a2bc544d067946bbd774975140147458caa
The mozbase unittests don't use mozunit, so their output is confusing in the log.
This makes mozbase output consistent with the rest of the python unittests.
MozReview-Commit-ID: AIs5mza8Rn6
--HG--
extra : rebase_source : 10f65e612f5b3cebb921c47699f5a8be7cd2ba5a
The mozsystemmonitor test is under mozsystemmonitor/mozsystemmonitor/test instead of
mozsystemmonitor/tests like all the other mozbase modules.
MozReview-Commit-ID: AIs5mza8Rn6
--HG--
rename : testing/mozbase/mozsystemmonitor/mozsystemmonitor/test/test_resource_monitor.py => testing/mozbase/mozsystemmonitor/tests/test_resource_monitor.py
extra : rebase_source : dde714fb9212f19d1f8ba566f574bd7e9d7c4030
Also we don't need to check the event time, it's out of scope of this test case.
MozReview-Commit-ID: JkbiiVPunGH
--HG--
extra : rebase_source : 4438091abfd7e55908ab15f543c6a4590acf45a6
This removes gaia_desktop, gaia_emulator, marionette_emulator,
webapi_desktop, and webapi_emulator test suite definitions.
MozReview-Commit-ID: Lf8slbzKNLz
--HG--
extra : rebase_source : 4a60c0cd0d05cabd0af74c15a85929d943c867f6
If there is a property called 'installer_path', the job is from in-tree
config.
MozReview-Commit-ID: E5SIHyxp0dM
--HG--
extra : rebase_source : e0251636e8e55613d58e743d70469e6b1a2175a5
taskcluster-scheduler is deprecated. mozharness uses it to get the task
graph in order to discover the parent of a task.
We now use queue to get the task definition, which contains the
'requires' field.
MozReview-Commit-ID: 8IivfxLvxVA
--HG--
extra : rebase_source : 76ad3993d50cb3dccca6b56652eec9568f5e5abb
When we scroll the element into the bottom of the viewport, it is the
first button that does not cause a scroll.
MozReview-Commit-ID: 1zv3uyUcnRn
--HG--
extra : rebase_source : 1cc3835c5bbcba941bceb3be98fdaa9b6f91d6b9
When returning the tree of interactable elemenets under the cursor, we
want to test the first one against the passed element, not that there
are _any_ interactable elements under the cursor.
MozReview-Commit-ID: AUvKAWKHgZk
--HG--
extra : rebase_source : 69563be46dbb18c4c814d6615b1bd2f97179b816
Add a test that checks that `scrollIntoView({block: "end", inline:
"nearest"})` works by placing the element at the bottom of the viewport,
where the overlay does not cover it.
MozReview-Commit-ID: Gzv9n17240G
--HG--
extra : rebase_source : 373c0da6c74bbf3953dc8b08e8b65929003b7d12
The old calcaulation to determine an element's in-view centre point was
wrong as pointed out in https://github.com/w3c/webdriver/issues/425,
and this is an implementation of the proposed algorithm which passes
real-world tests.
This also addresses https://github.com/w3c/webdriver/pull/441 which
checks if the `DOMRect` sequence returned from `getClientRects` is empty,
as it may be if the element's `display` style property is `none`.
MozReview-Commit-ID: 4uitUrviW2a
--HG--
extra : rebase_source : d9a3eefc9496500dffe74a28a117e29067a646f1
Checking for general interactability will also consider keyboard
interactability, which has not yet been implemented. On interacting with
an element by clicking, we should only test for pointer interactability.
MozReview-Commit-ID: BUCs7zHppRm
--HG--
extra : rebase_source : 2053a49ee4bcb291299568902e9ac25cc747bc5e
When scrolling an element into view using `Element.scrollIntoView`,
use the `{block: "end", inline: "nearest"}` scroll position arguments,
which are equivalent to `Element.scrollIntoView(false)`. This is what
other WebDriver implementations have used for a while, and we meant to
change to this sooner.
This ensures that the element appears at the bottom of the viewport
rather than the top, where overlaying menus with fixed style position
may more frequently appear.
In the future we might consider replacing this with `{block: "center"}`
which is specified in the CSSOM specification, but not yet implemented
in any browsers.
This implements https://github.com/w3c/webdriver/pull/440, which should
fix https://github.com/mozilla/geckodriver/issues/327.
MozReview-Commit-ID: BRMupP4fM89
--HG--
extra : rebase_source : 952edd6932b0f7e8b7d2694d428435508a4ffc8c
Only replace addDiv with createDiv in spacing-keyframes-transform.html.
Others are the same.
MozReview-Commit-ID: JNSpyc6WNtP
--HG--
extra : rebase_source : 05af4176e85234e1d89023f1e74012d0e1481230
This removes the `default_timeouts` internal state associated
with the Marionette client connection and introduces a new
API to reset all timeouts to their documented defaults in
`marionette_driver.timeouts.Timeout`.
MozReview-Commit-ID: 3xFWsYLngMp
--HG--
extra : rebase_source : a712985559c0c1d9cab3d08197a3351610fcb996
This was an ugly hack in the first place, and this seems like a good
opportunity to rectify it.
MozReview-Commit-ID: IB6Y8SlOfRn
--HG--
extra : rebase_source : b9968f01fa5da7319871ecaa145134479e595ab0
This ensure backwards compatible for consumers.
MozReview-Commit-ID: J2VOiB08xxV
--HG--
extra : rebase_source : 672b17642aa1463a9f65612c6494885a05d354fa
Introduce a new interface for managing timeouts in the Marionette
Python client.
MozReview-Commit-ID: JHojs7rWBz5
--HG--
extra : rebase_source : 388b8b3f30f07b95bf40edc57d13ffe5a7d5c502
The WebDriver specification mandates that the implicit wait timeout should
default to 0 (off), which in Marionette has the same effect as null.
MozReview-Commit-ID: Ca3RxO7gHv8
--HG--
extra : rebase_source : 5a804614b0bdf99c7d1241bbc06f3566f127b32f
This renames the `Marionette:timeouts` command
to `Marionette:setTimeouts`. It should be fine to make this
backwards incompatible change as the `Marionette.set_script_timeout`,
`Marionette.set_search_timeout`, and `Marionette.set_page_load_timeout`
commands all have existing try...except behaviour for another backwards
incompatible change in Firefox 52.
MozReview-Commit-ID: 58RrXhE2tN3
--HG--
extra : rebase_source : 67a52d6c48d5c94fdd4eb4e1120223778a83e0c2
This image currently has a version of the "run-wizard" binary baked in. This is out of date from the
canonical copy under taskcluster/scripts. This patch just copies what the "desktop-test" image does
by downloading that binary from version control.
MozReview-Commit-ID: Eg4x8slf3X9
--HG--
extra : rebase_source : 89e3dc5716c4bfb46ab807cc15df3e1e329a93d6
I'm not a fan of introducing a new configuration flags (and not
knowing where or how to document it!), but there's a clear need for
configuration in the absence of a documented way to add a coherent
"artifact build dimension" akin to "opt/debug". I like adding a
subtle tri-state flag even less, but I tried this with two flags
(ignore and build-variant) and it was worse, so I'm rolling with a
tri-state flag.
MozReview-Commit-ID: KTNvacTBUXB
--HG--
extra : rebase_source : 950373677c78c4f7ab574386d1894024f1ca3b12
As debug builds are inherently slow, we need to increase the wait
time before triggering the `setTimeout` callback so that the next
`marionette.execute_script` statement has time to run.
MozReview-Commit-ID: IAgicNAmVA6
--HG--
extra : rebase_source : dcb0ae95265e28e08c257260eff426d87a6340af
Marionette does not use specialpowers any more and it is pointless to
include it in the Marionette jar.
MozReview-Commit-ID: 8tzSO4VsMA7
--HG--
extra : rebase_source : a2a78e5a37a444b1d04dcae25551c8cbcc3aca61
We add opt and debug mozconfigs that enable stylo.
We define 2 new mozharness build configurations for stylo builds. These
occur only on Linux64 for the moment.
The mozharness configs are mostly copypasta. This is how you do things
in mozharness land.
MozReview-Commit-ID: 99XNOymw9Dx
--HG--
extra : rebase_source : d89ddd907ed96697f62637859f6f719601e03b01
All other browsers support a constructor here. Per current spec, the
constructor does not support .locale, although initCompositionEvent
does. If we ever decide to standardize .locale, the constructor can be
updated at that point. (Edge also supports .locale in
initCompositionEvent but not the constructor. Chrome doesn't support
.locale at all.)
Bug 1259889 Part 2 [1] cannot be reverted cleanly, so I manually undo those
changes in this patch. That is, remove the ability for html.css to
invalidate dynamically since it was added specifically for details element.
Although reftest-stylo.list explicit mentions "DO NOT EDIT!", but I still
remove details pref from the file, since it doesn't harm to edit it anyway.
[1] https://hg.mozilla.org/mozilla-central/rev/30aaf3805b56
MozReview-Commit-ID: FsyTGQTxujh
--HG--
extra : rebase_source : 25e5a05a8a5a47642772da69f427631fa07e232d
Following bug 1311116 which reduces the Marionette log verbosity for local
builds, this increases it on on all try jobs through passing the `-vv`
(very verbose, equating to `Log.Level.Trace`) flag to the Marionette
test harness.
MozReview-Commit-ID: ELGgJph6QZo
--HG--
extra : rebase_source : 1e3d957ef6c6f058f06f21b32bfb3bd3f1d8a38d
This patch removes support for mozapp iframes, leaving support for
mozbrowser iframes intact. Some of the code has been rewritten in order
to phrase things in terms of mozbrowser only, as opposed to mozbrowser
or app. In some places, code that was only useful with apps has been
completely removed, so that the APIs consumed can also be removed. In
some places where the notion of appId was bleeding out of this API, now
we use NO_APP_ID. Other notions of appId which were restricted to this
API have been removed.
Increase the default logging level for debug builds to `Log.Level.Info`.
If we desire a finer log level for debug builds on try jobs, we can
set the `marionette.logging` preference from the Marionette client in
the future.
MozReview-Commit-ID: 2vspGheBodq
--HG--
extra : rebase_source : 8f48cff0110e1f6572cedcda73884cfd48d69453
This duplicates code in client.mk to retrieve the number of cores. We should
probably just get the build system to define a global variable for this, but
I don't know how to do that.
MozReview-Commit-ID: CfAGbVMJXXT
--HG--
extra : rebase_source : 74fb1d1bcbeaafcde602f238a64198ff3ae6935e
For some reason calling os.getpgid(proc.pid) in this bug results in an OSError "No such process"
on OSX. This bug is starting the ProcessHandler from a concurrent.futures Thread, that must be
somehow related.
I tried debugging this, but couldn't figure out why this is happening. However, the pgid is not
needed for this use case, and simply ignoring the error works. We also ignore this very same
exception when calling os.getpgid elsewhere in mozprocess, so there must be some weird OSXism
happening.
MozReview-Commit-ID: 2YXhBaORC5s
--HG--
extra : rebase_source : 120e4bff7ef29d2a0ad1e3bdd2df11b8b682d981
Currently, artifact, static analysis, and valgrind build metrics go to
the same bucket as non-artifact build metrics. This results in
bi-modal metrics.
In this commit, we introduce a "perfherder_extra_options" config
value which is concatenated with the auto-derived values. We change
mozharness configs to add appropriate entries for various build
configurations.
I'm not keen on adding more functionality to mozharness. But this is
easier than having BuildMixin read state from the build system. I also
like the easy extensibility of this mechanism.
MozReview-Commit-ID: BBWA4ZsZ0cp
--HG--
extra : rebase_source : e6545f8fbd442da5d7ea62a6778d3c6274d5306c
There are a number of things that were going wrong with XPCShell on windows, this patch address them:
1) We were erroring out in Automation.killAndGetStack(), both failing to produce a minidump and failing
to kill the process. This patch fixes both these issues by using mozcrash instead.
2) Occasionally we were occasionally raising a psutil.NoSuchProcess error when attempting to kill the
process after the test. This appears to be caused by a race condition, but is safe to ignore as if the
process doesn't exist, then we don't need to kill it.
3) Spurious "Unable to remove directory" errors in cleanup. This uses mozfile.remove to remedy this.
MozReview-Commit-ID: 1g5qO8fpM7R
--HG--
extra : rebase_source : d8508d0f07e537e0b27e3377ccdbc20e1177d110
The previous code threw and logged an exception. TreeHerder found
this (harmless) warning and reported it as something more dangerous.
So handle the missing key without raising.
MozReview-Commit-ID: 4zBHrgBBXpe
--HG--
extra : rebase_source : 9959338312942730880cb110615c60a7601da167
This patch removes support for mozapp iframes, leaving support for
mozbrowser iframes intact. Some of the code has been rewritten in order
to phrase things in terms of mozbrowser only, as opposed to mozbrowser
or app. In some places, code that was only useful with apps has been
completely removed, so that the APIs consumed can also be removed. In
some places where the notion of appId was bleeding out of this API, now
we use NO_APP_ID. Other notions of appId which were restricted to this
API have been removed.
Addons can be installed and uninstalled using the Marionette client
utility found in testing/marionette/client/marionette_driver/addons.py.
It injects system-privileged chrome JavaScript to manipulate the addon
manager service.
To make this feature more widely adopted, i.e. by other clients such as
WebDriver, this patch moves the addon installation code to internally
in Marionette and exposes them as so called WebDriver extension commands.
This patch also _explicitly breaks_ backwards compatibility with
older Geckos that do not support the new Marionette:installAddon and
Marionette:uninstallAddon commands.
MozReview-Commit-ID: 18IceiGIg5H
--HG--
extra : rebase_source : 007802fa0a431a1438570caac3988177c6beab1d
This fixes a bug on Windows where we try to append .exe to the path
and so get an invalid, non-existing path by using the Fx binary as the
path and then stripping off the filename.
MozReview-Commit-ID: 8EWGGcz40iw
--HG--
extra : rebase_source : b4a54cc7197a40b55937c8f94ec01f75314581b0
* Compress docker images with zstd
* Removed need for context.tar from decision task
* Index images by level rather than project
MozReview-Commit-ID: 4RL4QXNWmpd
--HG--
extra : rebase_source : 677d8030a15af3288866a70fc648a10b22c396a3
This converts the tests to gtests. Most of them are just runtime tests and just
hava dummy assertion that everything ran. One test remains disabled, although
it's still built-in. You can run the disabled test with the following command:
> GTEST_ALSO_RUN_DISABLED_TESTS=1 ./mach gtest DeadlockDetectorScalability.*
MozReview-Commit-ID: 57rxjiZKjQ6
--HG--
rename : xpcom/tests/TestDeadlockDetectorScalability.cpp => xpcom/tests/gtest/TestDeadlockDetectorScalability.cpp
This converts TestDeadlockDetector to a gtest. The logic for spawning off
subprocesses is replaced with gtest's built-in death tests. On linux this will
clone() the process and assert that the child process generates the appropriate
assertion message. On OSX it will use fork(). In theory this should work on
Windows as well buy spawning a new process but this test currently disabled
there.
MozReview-Commit-ID: 9Sl0hHBVGT3
--HG--
rename : xpcom/tests/TestDeadlockDetector.cpp => xpcom/tests/gtest/TestDeadlockDetector.cpp
This converts the tests to gtests. Most of them are just runtime tests and just
hava dummy assertion that everything ran. One test remains disabled, although
it's still built-in. You can run the disabled test with the following command:
> GTEST_ALSO_RUN_DISABLED_TESTS=1 ./mach gtest DeadlockDetectorScalability.*
MozReview-Commit-ID: 57rxjiZKjQ6
--HG--
rename : xpcom/tests/TestDeadlockDetectorScalability.cpp => xpcom/tests/gtest/TestDeadlockDetectorScalability.cpp
This converts TestDeadlockDetector to a gtest. The logic for spawning off
subprocesses is replaced with gtest's built-in death tests. On linux this will
clone() the process and assert that the child process generates the appropriate
assertion message. On OSX it will use fork(). In theory this should work on
Windows as well buy spawning a new process but this test currently disabled
there.
MozReview-Commit-ID: 9Sl0hHBVGT3
--HG--
rename : xpcom/tests/TestDeadlockDetector.cpp => xpcom/tests/gtest/TestDeadlockDetector.cpp
This is mostly using the import-globals-from rule to pull in globals when
the subscript loader is used. For a couple of files I've turned off no-undef
altogether, these are files that are loaded by the subscript loader and depend
on globals from the parent.
MozReview-Commit-ID: 2ZzgpCQTTuu
--HG--
extra : rebase_source : 6d2f20111ae27858811bd19db794dc9fb29183d0