Add explicit test coverage for the Cache webAPI called from a moz-extension:// shared worker.
Categories
(WebExtensions :: General, task, P2)
Tracking
(firefox90 fixed)
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: rpl, Assigned: rpl)
References
Details
Attachments
(1 file)
In Bug 1575625 we are allowing extension principal globals to use the Cache WebAPI, this follow up is meant to add an additional test case that explicitly covers calling the Cache API from a moz-extension:// shared worker.
For reference:
- the following xpcshell test does cover running a moz-extension:// shared worker (it is likely also the only test explicitly testing moz-extension:// shared workers at the moment): https://searchfox.org/mozilla-central/source/toolkit/components/extensions/test/xpcshell/test_ext_shared_workers.js
- and this one is the xpcshell test covering the behavior expected to be allowed by default for the Cache WebAPI from an extension principal global: https://searchfox.org/mozilla-central/source/toolkit/components/extensions/test/xpcshell/test_ext_cache_api.js
Assignee | ||
Updated•3 years ago
|
Comment 1•3 years ago
|
||
FYI: There is a bug in Chromium about not being able to cache extension resources using the API:
https://bugs.chromium.org/p/chromium/issues/detail?id=651658
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
(In reply to Rob Wu [:robwu] from comment #1)
FYI: There is a bug in Chromium about not being able to cache extension resources using the API:
https://bugs.chromium.org/p/chromium/issues/detail?id=651658
we don't allow that neither (at least at the moment with the background service worker pref set as disabled as it is currently by default).
The current test case is this one, we may add one more assertion for a cache API call with the second optional response object parameter, but I'm pretty sure that right now we are disallowing it because the moz-extension:// url scheme isn't currently allowed here in mozilla::dom::cache::TypeUtils::ProcessURL
and so I would expect the behavior to be the same also in that case).
Nevertheless, thanks Rob for letting me know about that Chrome issue.
Assignee | ||
Comment 4•3 years ago
|
||
Attached patch pushed to try here:
Pushed by luca.greco@alcacoop.it: https://hg.mozilla.org/integration/autoland/rev/f70fef472359 Add explicit test coverage for the Cache webAPI called from a moz-extension:// shared worker. r=mixedpuppy
Comment 6•3 years ago
|
||
bugherder |
Description
•