Closed Bug 1227981 Opened 9 years ago Closed 9 years ago

Test that referencing a DTD from an add-on's inline options works

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: jwkbugzilla, Assigned: mossop)

References

Details

(Keywords: regression)

Attachments

(1 file)

Many extensions localize their inline options file, in fact even the example on https://developer.mozilla.org/en-US/Add-ons/Inline_Options includes a DTD file. With bug 1182546 fixed this no longer works - the inline options file is no longer allowed to load a DTD file.

Steps to reproduce:

1. Install Extension Auto-Installer from https://addons.mozilla.org/en-US/firefox/addon/autoinstaller/ (I would suggest Adblock Plus but it has bigger issues right now).
2. Find Extension Auto-Installer in the Add-ons Manager and click Preferences.

Expected results:

It is possible to set the port that Extension Auto-Installer listens on.

Actual results:

No inline options show up. Error Console shows:

> Security Error: Content at moz-nullprincipal:{6af7d648-5d82-9a44-89db-1a1103251c4a} may not load or link to chrome://autoinstaller/locale/settings.dtd.

> undefined entity settings.xul:10:3

The second error means chrome://autoinstaller/content/settings.xul

Assuming that the Add-ons Manager loads settings.xul via XMLHttpRequest: bug 1226823 comment 15 proposes setting request.channel.owner to system principal as a work-around.
bz, can you comment if Wladimir's suggested fix is the right one (the add-ons manager does indeed use an XHR to load the add-on's inline options) or should we be waiting for a more general fix from bug 1226869?
Flags: needinfo?(bzbarsky)
The latter.  Christoph is on it.
Flags: needinfo?(bzbarsky)
Attached patch testcaseSplinter Review
Until then here is a testcase for referencing a DTD from inline options. Worked before bug 1182546 landed and fails after.
Since the fix is happening elsewhere let's morph this to make sure we don't regress this again.
Assignee: nobody → dtownsend
Summary: Inline options for add-ons broken after bug 1182546 landing → Test that referencing a DTD from an add-on's inline options works
Blocks: 1228117
Attachment #8692078 - Flags: review?(rhelmer)
Attachment #8692078 - Flags: review?(rhelmer) → review+
https://hg.mozilla.org/mozilla-central/rev/378ef42875ed
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: