Closed Bug 1257299 Opened 4 years ago Closed 4 years ago

Use AppInfo.jsm instead of appInfoUtils.jsm.

Categories

(Chat Core :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Instantbird 48

People

(Reporter: arai, Assigned: arai)

Details

Attachments

(1 file, 1 obsolete file)

In bug 1153978, I'm going to split platformBuildID and platformVersion properties from nsIXULAppInfo to new nsIPlatformInfo interface, and it will break all mock app-info ("@mozilla.org/xre/app-info;1" contract) in xpcshell tests.

appInfoUtils.jsm [1] used in chat xpcshell test will also be affected by this change:

In bug 1256088, AppInfo.jsm [2] is changed to accept optional parameter to customize properties of mock app-info to register, and all tests in mozilla-central are fixed to use it instead [3].
AppInfo.jsm will be changed to implement nsIPlatformInfo interface in bug 1153978.

So, all consumers (actually only one [4]) of appInfoUtils.jsm should be rewritten to use AppInfo.jsm, to avoid bustage from bug 1153978.


[1] https://dxr.mozilla.org/comm-central/source/chat/modules/test/appInfoUtils.jsm
[2] https://hg.mozilla.org/integration/mozilla-inbound/file/c36ae47d019b/testing/modules/AppInfo.jsm
[3] https://hg.mozilla.org/integration/mozilla-inbound/rev/c36ae47d019b8015595b0adad2a4568b9821b299
[4] https://dxr.mozilla.org/comm-central/source/chat/components/src/test/test_accounts.js#9
Assignee: nobody → arai.unmht
Attachment #8731446 - Flags: review?(clokep)
Comment on attachment 8731446 [details] [diff] [review]
Use AppInfo.jsm instead of appInfoUtils.jsm.

Review of attachment 8731446 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for being mindful of comm-central! :)

::: chat/components/src/test/test_accounts.js
@@ +26,5 @@
> +    updateAppInfo({
> +      name: "XPCShell",
> +      ID: "{39885e5f-f6b4-4e2a-87e5-6259ecf79011}",
> +      version: "5",
> +      platformVersion: "1.9",

I think these 4 values were just whatever happened to be hardcoded (or more likely copy/pasted) at the time we wrote appInfoUtils.jsm, but I don't think anything in the test depends on these specific values, so updateAppInfo(); is likely enough.
Thanks :)
Removed options parameter.
Attachment #8731446 - Attachment is obsolete: true
Attachment #8731446 - Flags: review?(clokep)
Attachment #8731467 - Flags: review?(clokep)
Comment on attachment 8731467 [details] [diff] [review]
Use AppInfo.jsm instead of appInfoUtils.jsm.

Review of attachment 8731467 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks! :)
Attachment #8731467 - Flags: review?(clokep) → review+
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/8cf423dd5f474d324e88ffd2bfa76808105c2425
Bug 1257299 - Use AppInfo.jsm instead of appInfoUtils.jsm. r=clokep a=bustage fix CLOSED TREE
Status: NEW → RESOLVED
Closed: 4 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Instantbird 48
You need to log in before you can comment on or make changes to this bug.