Closed Bug 1398908 Opened 2 years ago Closed 2 years ago

Add automated test that uses nonexistent script from extension JAR file

Categories

(WebExtensions :: Request Handling, enhancement, P1)

56 Branch
enhancement

Tracking

(firefox56 wontfix, firefox57 wontfix, firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox56 --- wontfix
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: haik, Assigned: haik)

References

Details

Attachments

(1 file)

In bug 1395898, an extension included an HTML file with a <script> tag referring to a script that was missing from the JAR file. This exposed a bug in the ExtensionProtocolHandler which caused loading the HTML file to hang. We should have a test (or update an existing test) to exercise how missing files in a JAR are handled in ExtensionProtocolHandler remoting code.
See Also: → 1395898, 1397257
Priority: -- → P3
Summary: Add automated test that uses nonexistent script from JAR file (for bug 1395898) → Add automated test that uses nonexistent script from JAR file (for bug 1395898, 1402205)
The test should also add coverage for unpacked extensions that have links to missing scripts.
This has caused numerous serious issues over the past few months. We should prioritize getting it tested.
See Also: → 1402205
Summary: Add automated test that uses nonexistent script from JAR file (for bug 1395898, 1402205) → Add automated test that uses nonexistent script from extension JAR file
Assignee: nobody → haftandilian
The posted patch adds tests for missing scripts from a WebExtension JAR. Without the ExtensionProtocolHandler fixes for bug 1402205 and bug 1395898, this test results in hangs. We need the same tests for unpacked extensions, but I haven't been able to get the unpacked tests to work and don't have cycles to work more on this right now.
Attachment #8915233 - Flags: review?(mixedpuppy)
Comment on attachment 8915233 [details]
Bug 1398908 - Add automated test that uses nonexistent script from extension JAR file.

https://reviewboard.mozilla.org/r/186458/#review195138

This is great, but can you move it to an xpcshell test?  Look for "contentPage" for an example of getting a browser page loaded. r+ with that.
Attachment #8915233 - Flags: review?(mixedpuppy) → review+
Pushed by haftandilian@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/513578be7da2
Add automated test that uses nonexistent script from extension JAR file. r=mixedpuppy
Pushed by haftandilian@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a9b621688d28
Add automated test that uses nonexistent script from extension JAR file. r=mixedpuppy
https://hg.mozilla.org/mozilla-central/rev/a9b621688d28
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Is manual testing required on this bug? If Yes, please provide some STR and the proper webextension(if required), if No set the “qe-verify-“ or "in-testsuite+" flags.
Flags: needinfo?(haftandilian)
This bug adds a test for existing functionality with no other code changes so I've set in-testsuite+.
Flags: needinfo?(haftandilian) → in-testsuite+
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.