Discussion:
mochitest-plain and e10s OOP tabs
Jonathan Griffin
2009-12-01 21:07:29 UTC
Permalink
I've been poking around at getting mochitest to run in e10s with OOP
tabs enabled. There's quite a lot of tests that don't work right now,
since various features aren't available. But one of the obvious
problems that pops up is that many of the mochitest-plain tests use
UniversalXPConnect (mostly for managing preferences and initiating
events using EventUtils.js), and these tests all fail with the message
"A script from http://localhost:8888 was denied UniveralXPConnect
privileges."

Can someone confirm that this will remain the case, and that content
will not be able use XPConnect in an e10s world?

If so, I propose to deal with this by moving the affected tests (~370 of
them) to mochitest-chrome. There are possibly other ways to deal with
this, but this seems to be the most efficient fix.

Jonathan
Boris Zbarsky
2009-12-01 21:34:07 UTC
Permalink
Post by Jonathan Griffin
If so, I propose to deal with this by moving the affected tests (~370 of
them) to mochitest-chrome.
I'm ok for doing that for the events/preferences tests, though having
them in mochitest-chrome is a pain...

But it's odd that the enablePrivilege call fails at all. Are you
running these tests against the mochitest-generated profile?

-Boris
Jonathan Griffin
2009-12-01 23:44:29 UTC
Permalink
Yes, I'm running using the default mochitestingprofile.

Jonathan
Post by Boris Zbarsky
Post by Jonathan Griffin
If so, I propose to deal with this by moving the affected tests (~370 of
them) to mochitest-chrome.
I'm ok for doing that for the events/preferences tests, though having
them in mochitest-chrome is a pain...
But it's odd that the enablePrivilege call fails at all. Are you
running these tests against the mochitest-generated profile?
-Boris
Benjamin Smedberg
2009-12-02 00:19:38 UTC
Permalink
Post by Jonathan Griffin
UniversalXPConnect (mostly for managing preferences and initiating
events using EventUtils.js), and these tests all fail with the message
"A script from http://localhost:8888 was denied UniveralXPConnect
privileges."
Can someone confirm that this will remain the case, and that content
will not be able use XPConnect in an e10s world?
Well, we would like to remove the .enablePrivilege API altogether, but not
as part of e10s. universalxpconnect should still be available, if the right
preferences are set. What's happening here is that mochitest is setting
preferences (in the profile) which only apply to the chrome process. The
content process doesn't have a profile, and therefore doesn't load the prefs.

This will eventually be solved by bug 506269. However, note that the
environment that universalxpconnect gives you will be very different. For
instance, you will be able to *read* preferences, but not to write them.
Post by Jonathan Griffin
If so, I propose to deal with this by moving the affected tests (~370 of
them) to mochitest-chrome. There are possibly other ways to deal with
this, but this seems to be the most efficient fix.
This sounds reasonable to me. If we can remove .enablePrivilege from our
automated tests, that makes it much easier to remove it as an API altogether.

--BDS

Loading...