Covers DebuggerServer startup from shell.js with unit tests

RESOLVED FIXED in Firefox 29

Status

defect
RESOLVED FIXED
6 years ago
Last year

People

(Reporter: ochameau, Assigned: ochameau)

Tracking

unspecified
Firefox 29
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

We faced at least 2 major regressions this week that ended up breaking the app manager device support completely.

We used to face exception happening during actor instanciation due to some specific around actor loading on b2g and/or specific behavior of JSM on b2g.
It doesn't hit existing tests, as they all start DebuggerServer manually.

Ideally we would have a more functional test that would experience real world codepath for starting the debugger server.

We can easily do that by tweaking the existing webapps actor mochitest plain test script in order to trigger shell.js code instead of spawning our own server instance.
https://tbpl.mozilla.org/?tree=Try&rev=09172eea8c4d

First thing, this mochitest was disabled on b2g desktop...
Fix a small thing in specialpowers to get it working again.

Then, on b2g, I toggle the remote-enabled setting in order 
to trigger b2g/settings.js, that itself calls shell.js:RemoteDebugger.start().
I have seen the test fail on styleeditor regression as my tree was outdated,
so it could have avoided such regression!


Now that would be worth looking if we can somehow test getAppActor request,
and see if we get working tab actors out of it!
The test fails on the emulator, but works fine locally on b2g desktop :(

14:08:19     INFO -  139041 INFO TEST-PASS | /tests/toolkit/devtools/apps/tests/test_webapps_actor.html | == TEST == Install packaged app
14:08:19     INFO -  System JS : ERROR jar:file:///system/b2g/omni.ja!/components/SettingsService.js:79 - NS_ERROR_XPC_JS_THREW_STRING: 'DebuggerServer has not been initialized.' when calling method: [nsISettingsServiceCallback::handle]
14:08:19     INFO -  139042 ERROR TEST-UNEXPECTED-FAIL | /tests/toolkit/devtools/apps/tests/test_webapps_actor.html | Test timed out.
1

Sounds like a race between the chrome script and the setting toggle.
Comment on attachment 8357132 [details] [diff] [review]
Fixed exception on non-b2g envs

Try is now green!
Attachment #8357132 - Flags: review?(paul)
Comment on attachment 8357132 [details] [diff] [review]
Fixed exception on non-b2g envs

This will need to be revisited once bug 942756 lands (I'll take care of that).
Attachment #8357132 - Flags: review?(paul) → review+
checkin-needed?
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/50ebd3ce6651
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/50ebd3ce6651
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 29
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.