Tests which have to wait for a page being loaded should always use a timeout as
set via self.marionette.timeout.page_load.
MozReview-Commit-ID: HFTOYy6WYNk
--HG--
extra : rebase_source : cc2981595e2a62fd761baec8a3c15486832cc0ed
We add a new "on-off" protocol PURLClassifierLocal which calls
nsIURIClassifier.asyncClassifyLocalWithTables on construction and
calls back on destruction. Pretty much the same design as PURLClassifier.
In order to avoid code duplication, the actor implementation is templatized
and |MaybeInfo| in PURLClassifier.ipdl is moved around.
Test case is included and the custom event target is not in place for labelling.
The custom event target will be done in Bug 1353701.
MozReview-Commit-ID: IdHYgdnBV7S
--HG--
extra : rebase_source : ab1c896305b9f76cab13a92c9bd88c2d356aacb7
Testing the return value is misleading in this case. What we want to
test is that it does not throw due to a permissions issue.
MozReview-Commit-ID: 2Wbwou9opyF
--HG--
extra : rebase_source : cd056ed38b9cf7b9eb095635209fbe6b090721fd
The Components.classes constructor should throw an error in both the
mutable and the "default" sandbox.
MozReview-Commit-ID: C40nZNaVWwz
--HG--
extra : rebase_source : f02506f16ff409761ba09ae0f32ff2902cdf07a3
We accidentally only ran them in "default" and "system" before, and also
one of the arguments in the system globals test was wrong.
MozReview-Commit-ID: DmBYGsZaIVP
--HG--
extra : rebase_source : c9f1493ce3faed0ec2e5ad6125a4f7811a1fef03
We were previously missing a test for the arguments variable that is
implicitly exposed to functions.
MozReview-Commit-ID: IC6aJcUsyhd
--HG--
extra : rebase_source : 9039dcb7fcea681d8c9cd729cca8c55701631a5c
The Python standard library uses tuples to define arguments for functions,
whenever they are invoked through meta programming.
The Marionette client only allows the list type for backwards
compatibility, so we prefer tuples in this case.
Another good argument for tuples is that tuples are immutable.
MozReview-Commit-ID: 72zPzYvBz7Q
--HG--
extra : rebase_source : 2406e92b8bec8a965df6457bb166fd9761513b1e
Marionette does not protect the unloadHandler in
testing/marionette/evaluate.js from content introspection or
modification, which can happen when web frameworks override
window.addEventListener/window.removeEventListener.
The script evaluation module used in Marionette relies on
sandbox.window.addEventListener/removeEventListener to throw an error when
script execution is aborted due to the document unloading itself. If the
window.addEventListener/removeEventListener functions have been overridden
to introspect the objects that are passed, they may inadvertently touch
objects originating from chrome space, such as the unloadHandler.
Because the Gecko sandboxing system put in place strict security measures
to prevent accidental chrome-space modification from content, inspecting
the unloadHandler will throw a permission denied error once the script
has finished executing.
We have found examples in the wild of this in particular with the Angular
web framework. This patch makes the unloadHandler safe for introspection
from web content.
Fixes: https://github.com/mozilla/geckodriver/issues/515
MozReview-Commit-ID: E2LgPhLLuDT
--HG--
extra : rebase_source : 6fe4f61fd18f42fb5332a664189f3ea919db28c5
The gecko messages are now in the "process_output" action, rather than
in the "log" action (except for a few legacy cases), so examine both
when looking for LSAN messages.
MozReview-Commit-ID: 82r1p8WLwFa
--HG--
extra : rebase_source : 5af1c529e58f5ba90a3fd222e3cbbc67a850a08c
Errors thrown are printed to console and there is no point in having a
custom catch to print it.
This also makes it possible to start Marionette programmatically without
worrying about disappearing errors.
MozReview-Commit-ID: GGhyCyYqJg
--HG--
extra : rebase_source : 28937d94c8688c05887dcbf7dcf862e7bdc3a6c7
Port 666 is in the protected port range and can not normally be bound
to unless the process is running with sudo permissions.
We can instead bind to port 0, which will give us a system-defined port
in the epemeral range.
MozReview-Commit-ID: Ld6BDMhtbck
--HG--
extra : rebase_source : 0c2ae692dd675c664898e004c29a0e342fd9755b
This is a follow-up to address a fallout caused by bug 1344748 whereby
deprecated preferences relevant to Marionette are no longer being
picked up. This is preventing trace logs from being emitted in CI.
The old logic related to falling back to a deprecated preference is
faulty in that it the preferred, new preference always exists through
the power of testing/marionette/prefs.js. This patch introduces a new
helper method getPref that first looks at whether the preferred pref
is set, and only falls back to the deprecated if it isn't set and the
deprecation preference exists.
MozReview-Commit-ID: 8DeawLAELyK
--HG--
extra : rebase_source : d75ff2eff3941c2cb074d4f3983a70ebd66b8043
The Marionette component ships in Firefox, but is not enabled by default.
We want to facilitate activating Marionette at runtime by flipping
the marionette.enabled preference, and showing the Marionette related
preferences in about:config helps discoverability.
It is also useful to rely on the preferences' default values so that
they do not have to be hardcoded in the component.
When Marionette is enabled by setting marionette.enabled to true, a set of
recommended automation preferences found in testing/marionette/server.js
are set if the user has not overriden/user-defined one of them and
marionette.prefs.recommended is true (default). When Marionette is
stopped, the altered preferences are reset.
MozReview-Commit-ID: 3HLnEI0TEBB
--HG--
extra : rebase_source : 8be91ed46c443dd120cbc4b42c729cf3ae250b5f
Files appended to JS_PREFERENCE_FILES are moved into the
objdir/dist/bin/defaults/pref directory, shared with default global
preferences from other parts of Gecko.
To ensure Marionette's preference file ends up in this directory with
a sensible name, we put it in testing/marionette/prefs/marionette.js so
that it ends up in the objdir as dist/bin/defaults/pref/marionette.js.
MozReview-Commit-ID: 9YJ7vysDjSJ
--HG--
rename : testing/marionette/prefs.js => testing/marionette/prefs/marionette.js
extra : rebase_source : a5f275ed051eac659e89b55e8dfe950b67885618
Verify that there is no hang when we use pointer actions to
perform a click that results in navigation and document unload.
MozReview-Commit-ID: EO5FClnxML5
--HG--
extra : rebase_source : e4ea787bd7ad583d8141aef9ec2bf63df33ef912
This fixes the reported hang that occurs after a pointer click
action resulting in navigation.
MozReview-Commit-ID: A9SBhextVLH
--HG--
extra : rebase_source : 7de7f06a1c05e0e52a03f1850187926aa13a4b08