There are few cases (bug 1083617, bug 1092549) in B2G where bugs can only reproduce if there are mixed interactions from inproc frame and oop frame. Unfortunately upon investigation of how Emulator mochitests are being run, I found that mochitest pages are always loaded into a Mochitest app in the remote process. The remote attribute is hardcoded here: https://github.com/mozilla-b2g/gaia/blob/master/dev_apps/test-container/index.html#L7 Consequently, besides the problem above, the current setup means 1) the oop part of browser-element tests are actually invalid and redundant to be run in Emulator since we don't support nested process yet. 2) we currently don't offer any means to ensure our APIs continue to work if they are called from inproc frame, e.g. System app in the real phone. I therefore propose we should be able to make that remote attribute optional, either by (a) allowing certainly tests to flagged itself to be run inproc or (b) create a new mochitest runs with this flagged off. It seems that there is already an option in runtestsb2g.py http://dxr.mozilla.org/mozilla-central/source/testing/mochitest/runtestsb2g.py#31 but it's always set to true -- I wonder if this is the flag we should hook it up into ./testing/mochitest/b2g_start_script.js. I also don't know how to run that option off from ./mach. A more complex set up would be not to use Test Container app at all, and launch the Mochitest app as the first app, but that's more different than the current set-up and I don't really know what this could offer more than the proposal above. My original dev.b2g post provided more background: https://groups.google.com/forum/#!topic/mozilla.dev.b2g/ddfbjHtGV98
"All an option"? You mean "Add an option"?
The easiest approach here is to run in-proc tests as a separate subsuite, and to have them not launch the test-container app, but navigate directly to the mochitest test page (this is how mochitests were run before they were switched to OOP). This will require some manifest work (to flag tests that want to run in this mode), plus some buildbot work to schedule this different kind of job. Can you write a patch to flag all such tests with subsuite = inproc (or whatever you want to call it)? See http://dxr.mozilla.org/mozilla-central/source/browser/devtools/app-manager/test/browser.ini#3 We'll then need a patch to add back the functionality for out_of_process = False to the harness; making b2g_start_script.js handle this case is probably what we want to do. Can you implement this yourself or would you like our help? We can handle the buildbot work.
Glad you liked the idea! (In reply to Jonathan Griffin (:jgriffin) from comment #2) > Can you implement this yourself or would you > like our help? I could try to do it but it would not be the topmost item on my queue. Taking -- free feel to steal. > We can handle the buildbot work. Thanks!
Assignee: nobody → timdream
Summary: All an option or a test suite allowing Mochitest app runs inproc in B2G → Aadd an option or a test suite allowing Mochitest app runs inproc in B2G
Summary: Aadd an option or a test suite allowing Mochitest app runs inproc in B2G → Add an option or a test suite allowing Mochitest app runs inproc in B2G
Unassign myself due to project changes.
Assignee: timdream → nobody
Mass resolving of B2G mochitest bugs.
Status: NEW → RESOLVED
Last Resolved: 10 months ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.