Closed Bug 1191619 Opened 9 years ago Closed 9 years ago

Support extensions with no packaged manifest.webapp

Categories

(Core Graveyard :: DOM: Apps, defect)

defect
Not set
normal

Tracking

(firefox42 affected, firefox43 fixed)

RESOLVED FIXED
mozilla43
Tracking Status
firefox42 --- affected
firefox43 --- fixed

People

(Reporter: fabrice, Assigned: fabrice)

References

Details

Attachments

(1 file)

      No description provided.
Depends on: 1190995
This patch applies on top of bug 1190995.

It provides the capability to install zips that just have a manifest.json, and in this case checks that this is a chrome extension manifest and synthesize a webapp manifest.
Attachment #8644593 - Flags: review?(ferjmoreno)
Blocks: addons25
Comment on attachment 8644593 [details] [diff] [review]
no-webapp-addons.patch

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

Gregor, do you mind reviewing while ferjm is on pto?
Attachment #8644593 - Flags: review?(ferjmoreno) → review?(anygregor)
Comment on attachment 8644593 [details] [diff] [review]
no-webapp-addons.patch

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

::: dom/apps/Webapps.jsm
@@ +3828,5 @@
>      let isLangPack = newManifest.role === "langpack" &&
>                       (aIsSigned || allowUnsignedLangpack);
>  
> +    let isAddon = newManifest.role === "addon" &&
> +                     (aIsSigned || AppsUtils.allowUnsignedAddons);

Nit: indentation
Where does allowUnsignedAddons get set? Is this only for testing?

::: dom/apps/tests/addons/update.webapp
@@ +5,1 @@
>    "package_path" : "application.zip"

Shouldn't we test an invalid manifest file as well somehow?
Attachment #8644593 - Flags: review?(anygregor) → review+
(In reply to Gregor Wagner [:gwagner] from comment #3)
> Comment on attachment 8644593 [details] [diff] [review]
> no-webapp-addons.patch
> 
> Review of attachment 8644593 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: dom/apps/Webapps.jsm
> @@ +3828,5 @@
> >      let isLangPack = newManifest.role === "langpack" &&
> >                       (aIsSigned || allowUnsignedLangpack);
> >  
> > +    let isAddon = newManifest.role === "addon" &&
> > +                     (aIsSigned || AppsUtils.allowUnsignedAddons);
> 
> Nit: indentation
> Where does allowUnsignedAddons get set? Is this only for testing?

Yes, we have a SpecialPowers function for that.

> ::: dom/apps/tests/addons/update.webapp
> @@ +5,1 @@
> >    "package_path" : "application.zip"
> 
> Shouldn't we test an invalid manifest file as well somehow?

Indeed, I'll add that before landing.
https://hg.mozilla.org/mozilla-central/rev/54f3e2979aa2
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: