The setWindowRect capability is mandated by the WebDriver standard
and is an indication whether the driver supports manipulating the
window dimensions and position.
This will always be true for Firefox and always false for Fennec.
Change the switch-statement to only do assertions, and replace the
v variable with any parsed values before writing it to the matched
set of capabilities in one location.
A couple of changes to ensure that the mochitest harness doesn't try to
start executing changes before the mochitest extension is loaded:
1. Fix the marionette driver to wait for an installed extension to
be started before returning from Addon:install
2. Wait for extension API onStartup() handlers to finish before
considering a webextension started.
MozReview-Commit-ID: 8YEdNn6s5qh
--HG--
extra : rebase_source : 67e9abadcda82d55ac73c33367ec65cdbf7b823d
Support for the _xpcom_categories property was removed in Bug 568691,
but we left a bunch of consumers behind, and it's been cargo-culted a bit more.
We should remove the remaining remnants.
Differential Revision: https://phabricator.services.mozilla.com/D2429
--HG--
extra : moz-landing-system : lando
Capabilities matching is now done in geckodriver and Marionette
receives the negotiated set of capabilities, so there is no need
to derive default values in case the value is null.
WebDriver:{ExecuteScript,ExecuteAsyncScript} were missing user
prompt checks.
MozReview-Commit-ID: KL8gTBfSTrU
--HG--
extra : rebase_source : 7660e57079e82beb1aeb95d1673d69e82fef0394
- Access nsISSLStatus directly as a member of nsITransportSecurityInfo
and nsISecureBrowserUI. This is part of a larger effort to consolidate
nsISSLStatus and nsITransportSecurityInfo.
- The TabParent implementation of GetSecInfo will always return null.
- Removed unnecessary QueryInterface calls
- Style adherence updates
MozReview-Commit-ID: Dzy6t2zYljL
--HG--
extra : rebase_source : 9c400bed3c9d29a186fc987c9bd0ffceb37bfd94
Marionette currently truncates a selection of log messages that
exceed 250 characters. It is however sometimes, usually when
debugging locally, to not truncate logs so one can see exactly what
is sent to and fro the server.
Bug 1447977 introduced a new implementation of evaluate.isCyclic
that was not based on JSON.stringify to overcome cyclic references
stored on Element prototypes.
This patch reverts the new behaviour and hides it behind an environment
variable MOZ_MARIONETTE_NEW_CYCLIC. This is useful so we can more
easily test the difference in automation.
MozReview-Commit-ID: 2xtNL596Imc
JavaScript objects can be nested to any depth, and as such we must
check that the value to be serialised contains a cyclic structure
before attempting to marshaling it. We handle this correctly for
collections and arbitrary objects by relying on JSON.stringify.
For example with arrays:
let arr = [];
arr.push(arr);
And for objects:
let obj = {};
obj.reference = obj;
However, members of the different element prototypes (HTMLElement,
SVGElement, XULElement, et al.) may also contain cyclic references
via user-defined own properties:
let body = document.documentElement;
body.reference = body;
JSON.stringify enumerates an object's own properties, which means
it picks up on body's "reference" property in the above example.
Marionette needs to special case element prototypes because we want
to marshal them as web elements. This patch replaces JSON.stringify
with a custom function for testing if a value contains cyclic
structures that special-cases elements.
MozReview-Commit-ID: 1TQtHrjf401
--HG--
extra : rebase_source : 382cadca8a19971fbb74850b1904bb9ebdc9061e
Moves the innards of assert.acyclic to evaluate.isCyclic so it can
be called externally without throwing. It makes more sense for
this function to be exposed on the evaluate module, since other
behaviour related to JSON marshaling is also defined there.
MozReview-Commit-ID: 4WjEy8Sjqrm
--HG--
extra : rebase_source : 88cd829f3e178ec49ae532ea0af0a62defb4469f
Also changes the tooltip on the home button to be independent of the URLs
it opens, per dolske.
Some tests explicitly set browser.startup.homepage, but only through
SpecialPowers.putPrefEnv. That's a good compromise, given the extra
functionality there.
MozReview-Commit-ID: FPLxzi3jQAP
--HG--
extra : rebase_source : c2b014f2fb1c78ce04859344bd1803ef48d5d68d
The handling of user prompts for each of the commands is set by the
current sessions user prompt handler. To fully support this feature
this patch adds support for it including all available options which
are "accept", "accept and notify", "dismiss", "dismiss and notify",
and "ignore".
MozReview-Commit-ID: IWuYM7QfZUv
--HG--
extra : rebase_source : 56726bab5aaa29ad629d22247ab2b5409ca83bb8
When Puppeteer opens a new tab using various strategies it relies
on the list of window handles increasing. When performing the
reverse operation of closing a tab, it looks at the length of <tab>
chrome elements in the UI.
This changes the close operation to use the same mechanism as opening
a new tab to determine if the tab has been closed. This seems to
be as reliable as looking at the number of <tab> elements.
As part of a forthcoming window tracking refactoring of Marionette
(https://bugzilla.mozilla.org/show_bug.cgi?id=marionette-window-tracking),
the list of window handles will be made even more reliable: a content
browser will not appear in the window handle list until both the tab
and it's linked content browser has been created and properly initialised.
MozReview-Commit-ID: FY5vGBpn64R
--HG--
extra : rebase_source : 99bad0c88f3b00a46131f1a502e40c61560aa59b
Marionette uses nsIServerSocket which only allows to create a IPv4 listener.
On systems where IPv6 has precedence Marionette client will automatically
use the IPv6 address for `localhost` and will fail to connect to Marionette.
As such we should make sure that Marionette client connects to "127.0.0.1"
by default.
MozReview-Commit-ID: Fwzfa6CwBhX
--HG--
extra : rebase_source : c9f3f80074a18bd94b0836e648da4934e5ffa877
The WebDriver standard recommends that we return one of "windows",
"mac", or "linux". Additionally Marionette supports Fennec, for
which we return "android": this is fine because the specification
does not yet cover mobile browsers.
MozReview-Commit-ID: EgZ9UKrbsrd
--HG--
extra : rebase_source : da87fc9e809e1b89997712b33781a6ac42b3e8aa
This removes the "session." prefixed global export type in favour
of individually exported types.
MozReview-Commit-ID: 3DHTrJsy2IN
--HG--
extra : rebase_source : 74674f2cc549a245472304c55a14dd2eca1ee235
If val does not have a property nodeType, a warning is emitted to
the browser console. This is observable when running the xpcshell
unit tests because we mock out val without a nodeType property.
MozReview-Commit-ID: GzqMoJQQdF8
--HG--
extra : rebase_source : be793524551751e96e2059907cfc3eed3602cde5
The WebDriver standard recommends that we return one of "windows",
"mac", or "linux". Additionally Marionette supports Fennec, for
which we return "android": this is fine because the specification
does not yet cover mobile browsers.
MozReview-Commit-ID: EgZ9UKrbsrd
--HG--
extra : rebase_source : 14227ea60817a97d723d01f5fbaf193ee8e699de