The WebDriver specification requires IPv6 addresses to be always added
with brackets for proxy hosts. But Firefox itself handles those without
brackets for both the proxy host, and the noProxy settings.
MozReview-Commit-ID: 9vpvXjDDuxd
--HG--
extra : rebase_source : 0fa109cd8993df980e28c57a7ec3857e9e2ff932
To ensure that both methods are working as expected, they cannot be
used in combination for assertions.
MozReview-Commit-ID: 57jYmPejEq0
--HG--
extra : rebase_source : 59ffe0e20cab92535270e3ed3139a9439dc24107
The MessageOrigin enum is removed as a separate type and
exposed as Message.Origin. The enum variants can be accessed as
Message.Origin.Client and Message.Origin.Server.
MozReview-Commit-ID: 1caPthSMIWx
--HG--
extra : rebase_source : 2e59d77e22ad1a35a072005131b45a4cfc8851a5
Introduces a utility that truncates strings in potentially arbitrary
object structures. This allows JSON structures that contain long
strings to be shortened with an " ..." appendix for pretty logging
when data integrity is not a vital concern.
The maximum string length is currently set to 250 characters, which
is a number I have pulled out of a hat.
MozReview-Commit-ID: 2gauOvMzBCO
--HG--
extra : rebase_source : cea57d348a61ecd11a5a9cf564ed60737923f380
This is a plain conversion of the Marionette README to Markdown
syntax. The documentation itself is not great and could use more
love, but this is considered out of scope for this change.
DONTBUILD
MozReview-Commit-ID: IAdLyPPVFJH
--HG--
extra : rebase_source : be52f528144d70a50080f65475bd50f81b81e16b
Splits interaction.isElementSelected into two parts: one checking
whether the element DOM properties are selected/checked, and the
other checking accessibility. This so this so that the selectedness
can be unit tested, as we do not have the capability of standing
up accessibility in the xpcshell tests.
The second part of this change moves us away from atom.isElementSelected
in favour of a specification conforming implementation in Marionette.
This is a word-by-word implementation of the Is Element Selected
command from WebDriver.
MozReview-Commit-ID: 93WDKbPcEIB
The Delete Cookie command should not return an error if the cookie
does not exist.
The variable names "toDelete" and "candidateName" was also
juxtapositioned and wrong. Here I am using the approximate names
used in the specification prose for clarity.
Fixes: https://github.com/mozilla/geckodriver/issues/989
MozReview-Commit-ID: 6IIGGpB1JWn
--HG--
extra : rebase_source : f3149d2195c0e871370eef3d2c1306a8212c5751
The element.isStale function does not take into account the current
browsing context when checking an element’s staleness. This means,
for example, that an element in an <iframe> that gets retrieved, will
still be considered valid for as long as its associated document lives.
In WebDriver the expected behaviour is for the element reference to
only be valid for the current browsing context, meaning retrieving
the element reference when another browsing context is chosen should
return a stale element error.
Fixes: https://github.com/mozilla/geckodriver/issues/934
MozReview-Commit-ID: JpQVt78u5AN
The atoms were recently updated in https://bugzil.la/1375660, but
that changeset forgot to update the copyright information of this file.
DONTBUILD
MozReview-Commit-ID: CF6PYp6FlO0
--HG--
extra : rebase_source : 68f7a2a7909685f561e77a1f2a95db643add10d5
This patch moves the "timeout" and "interval" positional arguments
on PollPromise to an options dictionary.
In the following code example it is hard to know which argument means
what because they are not named:
new PollPromise(resolve => resolve(), 100, 100);
Named arguments can be achieved in JavaScript using option
dictionaries, and this patch changes the input PollPromise takes so
that the above example looks like this:
new PollPromise(resolve => resolve(), {timeout: 100, interval: 100};
This plays especially well with code in testing/marionette/element.js
as we already have named arguments that we can pass directly in through
an object literal, making the code more readable and more compact:
let timeout = 42;
new PollPromise(resolve => resolve(), {timeout});
MozReview-Commit-ID: GFWNGQAeWk1
--HG--
extra : rebase_source : 296843053e72bd07463a3018b06782f0dcc4828a
In formalising our synchronisation module, this renames wait.until
to PollPromise. It is a specialisation of a promise, just like
TimedPromise, that poll-waits a condition for a given amount of time
before either resolving (passing) or rejecting (failing) the poll-wait.
Also fix and improve documentation.
MozReview-Commit-ID: AcP3C1qCgKA
--HG--
extra : rebase_source : d17bb3be0819b0ce9de55d44741836fc00b10f46
testing/marionette/wait.js originally contained a utility for
poll-waiting on a condition. The module has since been expanded to
also include TimedPromise, which is a specialisation of Promise that
is rejected after a duration.
The latter is not a wait utility but a synchronisation primitive.
This terminology also covers the first, and this change renames the
wait module to sync.
MozReview-Commit-ID: Fd3LqfpiEaU
--HG--
rename : testing/marionette/wait.js => testing/marionette/sync.js
extra : rebase_source : f48ff62ca2589ab0ce4a2f3d134d392e6f0be015
This patch moves the "timeout" and "interval" positional arguments
on PollPromise to an options dictionary.
In the following code example it is hard to know which argument means
what because they are not named:
new PollPromise(resolve => resolve(), 100, 100);
Named arguments can be achieved in JavaScript using option
dictionaries, and this patch changes the input PollPromise takes so
that the above example looks like this:
new PollPromise(resolve => resolve(), {timeout: 100, interval: 100};
This plays especially well with code in testing/marionette/element.js
as we already have named arguments that we can pass directly in through
an object literal, making the code more readable and more compact:
let timeout = 42;
new PollPromise(resolve => resolve(), {timeout});
MozReview-Commit-ID: GFWNGQAeWk1
--HG--
extra : rebase_source : 06e558129f1e0acf3fbf8b6ca99c2407320b8e61
Now that we have selective imports through Cu.import we can give
wait.until a more descriptive name that matches TimedPromise.
This patch renames the wait.until utility to PollPromise.
MozReview-Commit-ID: 9gsvAV27mMl
--HG--
extra : rebase_source : ea98d63013d709d52ce234446404233d9dbe572e
testing/marionette/wait.js originally contained a utility for
poll-waiting on a condition. The module has since been expanded to
also include TimedPromise, which is a specialisation of Promise that
is rejected after a duration.
The latter is not a wait utility but a synchronisation primitive.
This terminology also covers the first, and this change renames the
wait module to sync.
MozReview-Commit-ID: Fd3LqfpiEaU
--HG--
rename : testing/marionette/wait.js => testing/marionette/sync.js
extra : rebase_source : 5e22ec5e26b5405c928ab26734a8d2ddc5d43785
The element 'button9' is moved off screen by CSS and as such it is not
marked as displayed.
MozReview-Commit-ID: KQCA2QfZLrT
--HG--
extra : rebase_source : bc7118324861781eaaab76005a19815a22df31e4
The Marionette server now returns a JSON containing the cause of shutdown which isn't included in previous Firefoxen. We needed to test this JSON in the quit and restart methods in the python client.
MozReview-Commit-ID: 8uL9tbNszcm
--HG--
extra : rebase_source : 7f01fe55444b034a5f07e42acac0224a981be881
There were two issues with the previous implementation:
* Domain cookies were created as host only cookies (due to lack of
leading '.' characters)
* The cookie domain included in the Marionette request was completely
ignored, which always resulted in host-only cookies
MozReview-Commit-ID: 2JLQ3vwNMrb
--HG--
extra : rebase_source : c72ba077ef1b1a1f308e4c9a1d2093c18f7483ce