CLOSED TREE
Backed out changeset 9af9111e9c27 (bug 1126089)
Backed out changeset 288efd5e2ca0 (bug 1126089)
Backed out changeset 3bcebfd13538 (bug 1126089)
Switches the whole test to task based and removes most of the CPOW traffic, the
plugin checks are the notable exception.
This also makes ContentTask act sanely in the presence of tab detach by using
browser.permanentKey as the indication that the framescript has been loaded and
just listening to all frames.
Also adds a click in the upper-left of the content area to browser_tabopen_reflows.js
to make sure the mouse isn't hovered over one of the tiles causing an unexpected
reflow.
Currently code used by many mochitest-browser tests is scattered
throughout the tree in various head.js files. Many similar or identical
helper methods are repeated throughout these files.
This commit introduces a BrowserTestUtils.jsm module and includes it in
the mochitest scope; the idea being these frequently re-implemented
methods can live in a central place.
A TestUtils.jsm module has also been introduced to contain code useful to
all types of tests.
When running tests locally, it's occasionally useful to be able to
increase the number of tests permitted to timeout before declaring the
test run a failure. This patch adds the necessary bits to SimpleTest
and the appropriate amount of plumbing to runtests.py and mach to make
that so.
This reworks how the Mochitest DOMWINDOW and DOCSHELL leak detector works. Rather than
collecting immediately in the top-level script, it sends a message to all processes
telling them to carry out collections. Each process prints out a message when it has
finished the collections. This message is used by the test harness to decide when windows
and docshells for that process should be have been destroyed.
In non-e10s mode, the shutdown leak detector is only run in the parent process, to work
around various issues with leak detection in the thumbnail process tests.
This reworks how the Mochitest DOMWINDOW and DOCSHELL leak detector works. Rather than
collecting immediately in the top-level script, it sends a message to all processes
telling them to carry out collections. Each process prints out a message when it has
finished the collections. This message is used by the test harness to decide when windows
and docshells for that process should be have been destroyed.
This change was generated using the `autopep8` module [1]. To replicate:
$ pip install --upgrade autopep8
$ cd gecko
$ autopep8 -i -a -a -r testing/mochitest --exclude 'testing/mochitest/pywebsocket/*'
[1] https://github.com/hhatto/autopep8
--HG--
extra : rebase_source : fb127187cd488b977981338373d66cc8c735214f
This introduces a new medule ContentTask, which includes a spawn method.
This new method can be used to spawn a task in the content process of a
browser. When called, a promise will be returned which resolves to the
value returned by the task.
This allows you to quickly write test code which can touch the content
and return information without having to write custom framescripts all
the time (The content code can be written inline as a simple generator
definition). ContentTask is automatically included in the scope of
mochitests.
An example use follows:
yield ContentTask.spawn(browser, {}, function* gen_replaceState() {
content.window.history.replaceState({}, "", 'test-entry/');
return "Value that the promise will resolve with";
});
--HG--
extra : rebase_source : 9b6ae71407da582cdaa8087b5e367c72fa08a337