FYI..
Already on m-c is the ability to run mochitests with e10s enabled - ie,
"./mach mochitest-browser --e10s path/to/some/browser_test.js".
However, many tests fail or timeout when run this way for reasons only
indirectly related to e10s.
A step on the road to getting tests *actually* working, I just landed
bug 935799 onto fx-team. Assuming it makes its way to central, it makes
it possible for many of these tests to now pass (or at least run to
completion).
This patch arranges for a special content-script to be loaded into all
remote browser elements created during the tests. This content-script
adds event handlers for events commonly handled by content scripts, and
"forwards" them back to the parent process. In effect, it simulates the
events propagating from the child to the parent.
While this isn't perfect, it does allow many existing tests to work when
they would otherwise fail to get started with e10s enabled. For
example, a pattern somewhat like the following is common in our tests:
openNewTabWith("
http://example.com/");
let tab = gBrowser.selectedTab = gBrowser.tabs[1];
tab.linkedBrowser.addEventListener("load", function onLoad(event) {
tab.linkedBrowser.removeEventListener("load", onLoad, true);
... do some tests...
This pattern will previously have failed in e10s. Depending on the
exact pattern used, the failure would be either an error ("contentWindow
is null") or, as in the case above, a timeout as no load event fires on
the linkedBrowser. With bug 935799, *most* patterns like the above will
now work. I say "most" as this event-forwarding-simulation isn't
perfect - tests that expect, eg, event.target to be the content window
will still fail - but such cases are the minority.
The next step in the path to good test coverage with e10s is to identity
which tests are known to fail with e10s, and excluding them via
skip-if/run-if annotations in the test manifests. Then we should be
able to run the entire test suite with e10s enabled, and while many
tests will be skipped, tests that previously worked and now fail can be
identitied as e10s regressions. Once we have that going we can set up a
TBPL instance to get regular and automatic testing. These last steps
are a while off, but we are slowly getting there.
Mark