Closed Bug 1387462 Opened 7 years ago Closed 7 years ago

dt-addon: support isInstalled in devtools-shim

Categories

(DevTools :: General, defect, P3)

defect

Tracking

(firefox57 fixed)

RESOLVED FIXED
Firefox 57
Tracking Status
firefox57 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

Attachments

(1 file)

In preparation for landing Bug 1369801, the DevToolsShim test should also be updated to work whether devtools are installed or not. This means using a stub for DevToolsShim isInstalled rather than relying on the real implementation which checks for the existence of the resource://devtools path.
Comment on attachment 8893831 [details]
Bug 1387462 - Fix devtools shim test if devtools are not installed;

https://reviewboard.mozilla.org/r/164940/#review170822

That's also something I already reviewed from bug 1369801 right?
Do not hesitate to land everything that is landable without the actual move to be a system add-on!
Attachment #8893831 - Flags: review?(poirot.alex) → review+
Comment on attachment 8893831 [details]
Bug 1387462 - Fix devtools shim test if devtools are not installed;

https://reviewboard.mozilla.org/r/164940/#review170822

Thanks for the review!

For this one, it's similar to what you reviewed, but I had to adapt the test to make it work whether DevTools are in Firefox or not.
When they are a system addon, they are not installed when running xpcshell tests => isInstalled returns false with our implementation based on checking resource://devtools.

Basically I just had to make sure mockDevToolsInstalled() is always called before testing anything, so that the test is not impacted by DevTools being actually there or not.
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dab6cd53b9a6
Fix devtools shim test if devtools are not installed;r=ochameau
https://hg.mozilla.org/mozilla-central/rev/dab6cd53b9a6
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: