Add tests to make sure that if an empty or nonempty manifest is run,
Marionette/Firefox are shut down as expected (previous behavior
was that the Marionette cleanup was never reached in this scenario).
MozReview-Commit-ID: 5hlUd0GQAQR
--HG--
extra : rebase_source : b7c4ca26710287bfb44f02474cb742dd56d821a3
The callback function available to asynchronously evaluated scripts is
defined in a privileged content frame script, and is thus not readable
or introspectable in a sandboxed content script. Attempting this will
yield a "Permission denied to access property" error.
To circumvent this problem we "hide" the callback function by wrapping
it before pushing it on the arguments object that is applied to the
injected script.
This allows introspection into the _immediate_ elements on the arguments
object available to executed scripts.
MozReview-Commit-ID: 9ZigPNYcYpf
--HG--
extra : rebase_source : 64e71886100f65dbd93f4857615f256edf4fc050
Adds support for navigating to a fragment on the currenty visible document
without waiting for a DOM event that the document has been fully loaded.
This addresses https://github.com/mozilla/geckodriver/issues/150.
MozReview-Commit-ID: 7uiPT5cjGQE
--HG--
extra : rebase_source : f9152a6623a25c17e10dc3bc6552b8e635c21317
Currently Marionette returns directly from appInfo where the webdriver
specification mandates that we return lowercase for those. See
http://w3c.github.io/webdriver/webdriver-spec.html#capabilities
MozReview-Commit-ID: 4UrOcYRuREK
--HG--
extra : rebase_source : b47a4be6f4eb17e3bf9caf8542cc2f03582df946
Before Firefox 49.0 there is no processId property available. Given that Firefox ui update tests
have to use the Marionette version from the post build also for the pre build, we currently fail
during in_app restarts for Firefox 48.0 and below.
MozReview-Commit-ID: ILG7JLg0dcS
The Marionette remote server sequences messages following bug 1211489.
In the client we can make advantage of this by skipping out-of-sync
messages.
This helps avoid issues such as bug 1207125, where a Python process
interrupt causes the receive() for the current command to be aborted,
and a new command to be issued to retrieve some debug information.
When the new command's receive() is called, it reads the response from
the previous command.
To get around this problem we must read through the data until we reach
the response we are expecting. Only at that point should we return from
receive() and give the user the expected response.
MozReview-Commit-ID: 3qF9Xo3pb5W
--HG--
extra : rebase_source : dc5cfe7e5f25d7bbe38e1c85f396145bcea968f7
This decorator was previously returning a reference of itself, rather
than executing the test item. This caused it to always pass.
MozReview-Commit-ID: FbzIHqixHyz
--HG--
extra : rebase_source : f01fc3ce515e9e43c72309a2519429112673fa8f
By default, frame scripts each have their own scope, so they can declare
global variables without causing conflicts with any other frame scripts.
The current code switches off that behaviour, meaning that the script's
scope is shared with any other frame scripts in the same frame.
This patch changes it so that each loaded frame script gets its own
scope. This works around the problem that on Windows in officially
branded builds, IPC message handlers are registered twice causing a race
condition in the IPC communication between driver.js and listener.js.
This is not a solution for fixing the core of the problem.
MozReview-Commit-ID: Fcjmi7tq5eA
--HG--
extra : rebase_source : e60adf91a98bf9ca78392ca1da804d82a0d7b885
The preference startup.homepage_welcome_url.additional causes problems
with official branded builds and breaks certain Marionette tests, such as
testing/marionette/harness/marionette/tests/unit/test_window_handles.py
and testing/marionette/harness/marionette/tests/unit/test_selected.py.
Many Marionette tests make assumptions about the number of open windows,
and this aligns the test environment of the officially branded builds
to be more similar to that of Nightly builds.
There is another issue in Marionette, described in bug 1239552, that we
register the listener IPC message handlers twice. This patch does not
directly address that problem.
MozReview-Commit-ID: KEdJEcOxyGy
--HG--
extra : rebase_source : 48c61804618c76dc0b69abf94421b7e45f4ddfb0
Under some circumstances Marionette currently fails to stop the application in case of socket issues. To
ensure that the application always gets closed - in the case when Marionette started it - the check for crashes
decorator gets updated to do a full process check.
MozReview-Commit-ID: DAiF2ZjAjT5
--HG--
extra : rebase_source : 9e959b4187ef959ee9b7262e8438a5aa84396723
Custom Marionette error classes should not re-invent the message property which already exists in the
Exception class. This is fixed by calling constructor appropriately.
MozReview-Commit-ID: 1oWjg7MnrSe
--HG--
extra : rebase_source : 81a63c496f6bfbfda2565583edd18cbe1944fd99
Whenever an exception is raised while tests are executed, the log error message should only be
printed once. As best this should happen in `cli()`, so that subclasses can better set their
own behavior, and we safe us from re-raising the exception.
MozReview-Commit-ID: 5NLBnJAjUMQ
--HG--
extra : rebase_source : 17e1574c8671037912d85c0575db493c96f972b2
With the initial browser defaulting to remote, there's a greater likelihood
that the DOMContentLoaded event that is handled in the "get" function will
be fired by the initial about:blank instead of the actual desired page.
get() currently works around this by ensuring that the URL of the loaded
page matches the requested one when DOMContentLoaded fires. Unfortunately,
this doesn't work for pages that redirect via their HTTP headers (and will
therefore not fire DOMContentLoaded).
This patch fixes things by adding an nsIWebProgressListener that ensures
that the requested page has started to load before paying any attention
to the DOMContentLoaded events. This handles the redirect case. We also
compare against nsIChannel.originalURI for the about: redirect case.
For neterror pages (which never open channels, and therefore are not
seen by the nsIWebProgressListener), we just check that the page that
we attempted to reach was the one that was requested.
MozReview-Commit-ID: Gbbmfwat46s
--HG--
extra : rebase_source : 1848cd67757be8780f9e50253dc0ee1131467257
Before, it was assumed that the next load was the one that the Marionette client had
asked for, when this might not be the case. For example, when a new window opens,
it's possible for the initial about:blank load to be fired in content after the
parent has asked for a page to be loaded.
MozReview-Commit-ID: GPoJgbCvSju
--HG--
extra : rebase_source : 7b4c1638c2fe81a0a37d061a655e35aed0e2daa0
extra : source : b2e910bb1d726562548eba1148a81ec37300fb7b
This removes the unnecessary setting of c-basic-offset from all
python-mode files.
This was automatically generated using
perl -pi -e 's/; *c-basic-offset: *[0-9]+//'
... on the affected files.
The bulk of these files are moz.build files but there a few others as
well.
MozReview-Commit-ID: 2pPf3DEiZqx
--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
It turns out that certain objects such as a DOMRectList have peculiarities
that cause string comparison to throw. This is normally not a problem
as error.isError is usually passed JSON serialisable data. But when it
is not, this try condition helps diagnose problems.
MozReview-Commit-ID: BLNSziwfxXs
--HG--
extra : rebase_source : 8bad973a20d8b69fa27f5de66e4ea287d4bcddcd
This patch adds marshaling of HTMLFormControlsCollection,
HTMLAllCollection, and HTMLOptionsCollection element collections to
Marionette.
It will allow us you to return from HTMLSelectElement.options,
document.forms[0].elements, and document.all. This is in
addition to the already supported document.querySelector
(NodeList), document.getElementsBy* (HTMLCollection), and
Array.from(ELEMENT...) collections.
MozReview-Commit-ID: 71a65lZRn4S
--HG--
extra : rebase_source : aff3490ceb0db110f392956baaacbd5e2e7acb62
The tests had the same name which caused a redefinition meaning only one of the tests
was run.
MozReview-Commit-ID: LuflhcD4wKl
--HG--
extra : rebase_source : 09b233c42cd0dba4437f51dc63986c119711cd70