Previously fnName and line was tested as the entry requirement for
printing the filename to the trace information. Testing line here was
premature since it is meant to be an optional argument.
This patch rectifies this behaviour by testing for each of the optional
arguments sequentially. This means the file argument is required to print
the line, and the fnName argument is required to print any of those two.
Updating Marionette to click on the centre of the first client rect instead of
clicking on the centre of the bounding rect. This allows us to click on multiline
links and other items where where are mutliple DOMRects associated with
an element.
The patch for bug 1239363 treated the marionette.logging preference as
a defined/undefined state, and didn't look specifically at the state of
the variable itself.
This meant that if it was set to false, logging would still be enabled.
As this was not the original behaviour were adding backwards compatibility
for, this patch corrects this problem by making false equivalent to the
default (Log.Level.Info).
The marionette.logging preference used to have a boolean type.
To maintain backwards compatibility with earlier clients we keep accepting
boolean types as input.
Previously setting it to true meant you wanted all the logs, and this
change respects that.
Passing the version keyword to argparse's constructor implicitly adds
-v and --version flags that conflicts with the -v/--verbose flag that
is added in BaseMarionetteArguments.
This removes -v as an alias to --version, which unbreaks testing on try
because it uses runtests.py.
It's perhaps worth mentioning that try uses runtests.py because it does
not (yet) have a full checkout of the source when it runs the tests.
Adds -v and --verbose flags to the `./mach marionette-test` command to
increase the verbosity of the Marionette logging output.
A single -v corresponds to Log.Level.Debug and above. A double -vv
or more corresponds to Log.Level.Trace and above.
This change allows the logging level for Marionette to be set using
a preference. This lets an out-of-process program control Marionette's
logging level.
It also changes the logging defaults to print log messages with the level
Log.Level.Info and above for optimised builds, and Log.Level.Trace
and above for non-optimised/debug builds.
The log level can be set through the marionette.logging preference.
It holds a string value that needs to correspond to a level defined in
toolkit/modules/Log.jsm's Log.Level enum.
This fixes serialisation of XPCOM exceptions to the client.
Response.sendError was incorrectly serialising the err input variable
instead of the wrapped WebDriverError, we.
r=dburns
The current test of the `result' property does not always pass for all
types of XPCOM exceptions. A safer test is to do an instance check
against Components.interfaces.nsIException.
This fixes hangs such as the one described in bug 1202576.
r=dburns
Message sequencing allows Marionette to provide an asynchronous,
parallel pipelining user-facing interface, limit chances of payload
race conditions, and remove stylistic inconsistencies in how commands
and responses are dispatched internally.
Clients that deliver a blocking WebDriver interface are still be expected
to not send further command requests before the response from the last
command has come back, but if they still happen to do so because of
programming error or otherwise, no harm will be done. This will guard
against bugs such as bug 1207125.
This patch formalises the command and response concepts, and applies
these concepts to emulator callbacks. Through the new message format,
Marionette is able to provide two-way parallel communication. In other
words, the server will be able to instruct the client to perform a
command in a non ad-hoc way.
runEmulatorCmd and runEmulatorShell are both turned into command
instructions originating from the server. This resolves a lot of
technical debt in the server code because they are no longer special-cased
to circumvent the dispatching technique used for all other commands;
commands may originate from either the client or the server providing
parallel pipelining enforced through message sequencing:
client server
| |
msgid=1 |----------->|
| command |
| |
msgid=2 |<-----------|
| command |
| |
msgid=2 |----------->|
| response |
| |
msgid=1 |<-----------|
| response |
| |
The protocol now consists of a "Command" message and the corresponding
"Response" message. A "Response" message must always be sent in reply
to a "Command" message.
This bumps the Marionette protocol level to 3.
r=dburns
r=jgriffin
The Python client sends a `max_length' command parameter to multiAction,
but the Marionette server looks for `max_len'. This likely a regression
from a refactor.
r=dburns
Message sequencing allows Marionette to provide an asynchronous,
parallel pipelining user-facing interface, limit chances of payload
race conditions, and remove stylistic inconsistencies in how commands
and responses are dispatched internally.
Clients that deliver a blocking WebDriver interface are still be expected
to not send further command requests before the response from the last
command has come back, but if they still happen to do so because of
programming error or otherwise, no harm will be done. This will guard
against bugs such as bug 1207125.
This patch formalises the command and response concepts, and applies
these concepts to emulator callbacks. Through the new message format,
Marionette is able to provide two-way parallel communication. In other
words, the server will be able to instruct the client to perform a
command in a non ad-hoc way.
runEmulatorCmd and runEmulatorShell are both turned into command
instructions originating from the server. This resolves a lot of
technical debt in the server code because they are no longer special-cased
to circumvent the dispatching technique used for all other commands;
commands may originate from either the client or the server providing
parallel pipelining enforced through message sequencing:
client server
| |
msgid=1 |----------->|
| command |
| |
msgid=2 |<-----------|
| command |
| |
msgid=2 |----------->|
| response |
| |
msgid=1 |<-----------|
| response |
| |
The protocol now consists of a "Command" message and the corresponding
"Response" message. A "Response" message must always be sent in reply
to a "Command" message.
This bumps the Marionette protocol level to 3.
r=dburns
r=jgriffin
Moves most of the cookie implementation to a new file,
testing/marionette/cookies.js. The new Cookies class encapsulates all
APIs for manipulating and querying cookies from content space.
It communicates with chrome space, where the cookie manager lives, through
a new SyncContentSender provided by testing/marionette/proxy.js. This new
interface provides synchronous and transparent communication from content
to chrome, not dissimilar from how the original listener proxy works.
r=dburns
In order to meet the addon signing requirement for tests, specialpowers
needs to be installed at gecko runtime. This means it must be restartless.
This patch packages specialpowers as a restartless addon, but it does not
yet install it at runtime.