In test_marionette_runner.py, fix pytest warning raised when
importing TestManifest class directly in global namespace.
In test_marionette_arguments.py, improve readability by
shortening/changing some names and removing unnecessary
comments (not needed as code is self-explanatory).
MozReview-Commit-ID: GDzxlEqb7MB
--HG--
extra : rebase_source : 78927cae7f8ec011d2b398e3a1ce71174d7b028c
Split the Marionette harness unit tests, all of which were
previously located in the single module test_marionette_runner.py,
into modules that each test a specific class or group of
similar classes. This will make it easier to add and locate
new tests in the future, based on the class they are testing.
The new module structure within tests/harness_unit/ is:
* test_marionette_harness.py - tests for MarionetteHarness and
the command-line interface
* test_marionette_arguments.py - tests for MarionetteArguments
(future: BaseMarionetteArguments and RemoteMarionetteArguments)
* test_marionette_runner.py - tests for MarionetteTestRunner
and BaseMarionetteTestRunner (future: MarionetteTextTestRunner)
* test_marionette_test_result.py - tests for MarionetteTestResult
(future: MarionetteTest)
* conftest.py - pytest fixtures used in multiple modules
(fixtures specific to a single module are defined in that module)
MozReview-Commit-ID: CGh6Aa07lfV
--HG--
extra : rebase_source : faa7d27135aa6e4c6c44fa60aab6f2b5d6339961
The test is testing the case where Marionette attempts to send a
command to a window handle when the browser has opened and selected
a new tab. See the documentation in the test for more details.
MozReview-Commit-ID: McDqG5kCIj
--HG--
extra : rebase_source : bd085f5116333f7321ef9313147cdcd0dc80ae64
Events were not registered when constructed with an object
rather than a string literal.
MozReview-Commit-ID: KhXcDPu70Vm
--HG--
extra : rebase_source : 7ea228e47c89c2775ab5c2c1fab63b5f8fe4db14
Tuples is are most commonly used in the Python standard library
to represent function argument iterables.
This patch changes the Marionette Python client to support both
tuples and lists.
MozReview-Commit-ID: 9c6SGeWEIBL
--HG--
extra : rebase_source : 4defc071dd15ab5117ad43c76840b04dbdf80933
Remove if-blocks that depend on code removed in Bug 1274408
MozReview-Commit-ID: JJHEiMBIm1b
--HG--
extra : rebase_source : e83fdea488fe24c38a81a98ab8a9e800212a167c
This is useful for overriding the computed Android package name in
automation.
MozReview-Commit-ID: jm283iQB2i
--HG--
extra : rebase_source : d4d1ab8176aa0383b93c8dde0982d22604aabd05
This makes it possible to run |mach marionette-test| from a test package (and therefore
also an interactive loaner).
MozReview-Commit-ID: Lxhe8KMQaWq
--HG--
extra : rebase_source : ee2c01a80d863c2044d8d30b0e5116c8a9704253
Add tests to test_marionette_runner.py to
verify the functionality of the _build_kwargs method
of BaseMarionetteTestRunner, which is used
to generate the kwargs with which the
driverclass (Marionette) constructor is called.
Test that _build_kwargs generates the right
dictionary based on the values of certain
runner properties (binary, emulator,
address, and workspace).
Add helper fixtures to reduce duplication between
the test_build_kwargs_* tests.
MozReview-Commit-ID: EyyfaE52rzS
--HG--
extra : rebase_source : 2ec977672c46dabb2e9644faada17207fcb51690
Add tests to test_marionette_runner.py to verify that:
- when the MarionetteHarness constructor is called,
the arguments to that call are passed on to
the _runner_class constructor
- when run_tests() is called on the runner,
the output of _build_kwargs is passed on as
arguments to the call to the driverclass
constructor
In combination with a test of the runner's _build_kwargs
method, this should ensure that the driver class
constructor is being called with the appropriate arguments
based on the input to the harness class constructor.
MozReview-Commit-ID: 4U3sXxHSIpS
--HG--
extra : rebase_source : 3ca439613f13c6064c0dcbfb603c049f75233b71
When the Marionette client closes the socket connection it currently only calls close() on it.
This will actually decrease the reference counter, and keeps the OS socket around until it gets
garbage collected by the system. This can cause port in use failures for socket connections
created shortly after eg. restarts of the appication. By using shutdown() the client indicates
that the socket has to be closed immediately.
MozReview-Commit-ID: 3jUgaWnujLc
--HG--
extra : rebase_source : 3111d041585a8e50258d2be9bfef55708f80d4b4
This patch introduces support for clicking on <select> and <select
multiple> elements to Marionette. As <select> elements, especially
<select multiple>, are operating system level concepts usually implemented
with native widget sets, this patch takes the approach of dispatching
generated events.
MozReview-Commit-ID: 9kwOva43AOL
--HG--
extra : rebase_source : dde090ed9487e593bc16f8a7e12365b97ada9735
Also fixes assumptions about permitted mouse events.
MozReview-Commit-ID: 33MKL60cKXi
--HG--
extra : rebase_source : 59f838c42a19b3bbedc42fa5a78d84c15ab176a2
"Check" is a fine word but with functions which primary purpose is to
throw an error internally we should use "assert" to make the reprecussions
of using them crystal clear.
MozReview-Commit-ID: Kef4R8y8fiV
--HG--
extra : rebase_source : eb22beb7a33e593f34b3d24ecdaaa7f99d8e5f87
Some of the element interactability- and visibility checks were previously
done when interaction.clickElement was called, and not as part of the
resolution of the returned promise. This could have caused a potential
race condition.
MozReview-Commit-ID: 691V86B4k5w
--HG--
extra : rebase_source : 7a6951d9c29aa5fa3eb3852d3d6d33e65f7d72c4
We want to redo the element interactability calculation after scrolling.
Determining if an element is not visible by the old location would
be wrong.
MozReview-Commit-ID: KGaPVmgcqSX
--HG--
extra : rebase_source : 12ac51e5c9947da1082351c4e382cfc95ea8f843
The if-condition in the specification compatible interactability check
for interaction.clickElement is wrong. It should scroll an element into
view when it is _not_ visible. If it is visible it does not matter.
MozReview-Commit-ID: 2n34QddDkQv
--HG--
extra : rebase_source : efe079de9a1fa930ea2f3d9d8fff59fc9a4e269b