Closed Bug 789265 Opened 12 years ago Closed 8 years ago

[B2G] dom/indexedDB/ipc/test_ipc.html times out with 330s of no output

Categories

(Core :: Storage: IndexedDB, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jgriffin, Unassigned)

References

Details

The test dom/indexedDB/ipc/test_ipc.html times out with 330s of no output:

370 INFO TEST-START | /tests/dom/indexedDB/ipc/test_ipc.html
371 INFO Error: Unable to restore focus, expect failures and timeouts.
372 INFO TEST-PASS | /tests/dom/indexedDB/ipc/test_ipc.html | Got first iframe load event.
TEST-UNEXPECTED-FAIL | automation.py | application timed out after 330 seconds with no output

full log:  http://brasstacks.mozilla.com/autologserver/showlog?file=d6f6be48-f85e-11e1-b2fd-22000af4858b.txt.gz

This test will be disabled from future B2G test runs.
When trying to run test_ipc.html currently in b2g mochitest, I get this error:
3 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/indexedDB/ipc/test_ipc.html | uncaught exception - TypeError: comp.classes['@mozilla.org/special-powers-observer;1'] is undefined at http://mochi.test:8888/tests/dom/indexedDB/ipc/test_ipc.html:134

http://mxr.mozilla.org/mozilla-central/source/dom/indexedDB/ipc/test_ipc.html?force=1#134
133         let spObserver =
134           comp.classes["@mozilla.org/special-powers-observer;1"]
135               .getService(comp.interfaces.nsIMessageListener);
Depends on: 861850
This means that SpecialPowers isn't available in the child process.  SpecialPowers is hooked up a little differently in B2G than in Firefox; we'll have to figure out how to make it work in both contexts.
The specialpowersobserver component is never registered in b2g, because specialpowers isn't installed as an extension.
Components.classes["@mozilla.org/special-powers-observer;1"].getService(comp.interfaces.nsIMessageListener) doesn't exist and I have no idea on how to get that working.
Is that possible in b2g apps in a ipc world?
Although, there appears to be a b2g components directory.
http://mxr.mozilla.org/mozilla-central/source/b2g/components/
Maybe if the SpecialPowersObserver.js file is put there, thing will work?
One of the "tricky" things here is that mochitests on b2g require a Marionette-enabled build, and Marionette loads SpecialPowers and exposes it to the parent process:  http://mxr.mozilla.org/mozilla-central/source/testing/marionette/marionette-actors.js#27

I believe if you tried to add it to the b2g components directory, it would conflict with Marionette, and one or the other would fail to load.

If you want to try adding specialpowers to b2g components, you'd probably have to hack out Marionette's specialpowers handling.  If that worked, then we could figure out the "right" way to do it.

As an alternate approach, you might be able to load specialpowers in test_ipc.html similar to how we do it here:

http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/runtestsb2g.py#57
(In reply to Jonathan Griffin (:jgriffin) from comment #5)
> As an alternate approach, you might be able to load specialpowers in
> test_ipc.html similar to how we do it here:
> 
> http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/runtestsb2g.
> py#57

I tried that, but I got permission denied errors. I guess because test_ipc.html does not have chrome privileges.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.