Closed Bug 1408347 Opened 7 years ago Closed 7 years ago

Add referrer policy test for link rel=preload

Categories

(Core :: DOM: Security, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: tnguyen, Assigned: tnguyen)

References

(Blocks 1 open bug)

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file, 2 obsolete files)

We did support referrer policy in http://searchfox.org/mozilla-central/rev/ed1d5223adcdc07e9a2589ee20f4e5ee91b4df10/uriloader/prefetch/nsPrefetchService.cpp#125
including rel=preload, but it's likely we are missing referrer policy test for link rel=preload.
We should for Bug 1393540 is fixed then we could add this test
Priority: -- → P3
MozReview-Commit-ID: JBE5FEa7pC1
Attachment #8918710 - Attachment description: Add referrer policy test for link rel=preload → pre - add referrer policy test for link rel=preload
(In reply to Thomas Nguyen[:tnguyen] ni? plz from comment #1)
> Created attachment 8918710 [details] [diff] [review]
> pre - add referrer policy test for link rel=preload
> 
> MozReview-Commit-ID: JBE5FEa7pC1

Preload works fine in body, however, it does not work in speculative loading due to Bug 1393540. Will land this after Bug 1393540 is fixed
Attached file test_link_preload.html (obsolete) —
Attachment #8918713 - Attachment mime type: text/html → text/plain
Assignee: nobody → tnguyen
Status: NEW → ASSIGNED
Priority: P3 → P2
Whiteboard: [domsecurity-active]
Blocks: 1409600
Attachment #8918710 - Attachment is obsolete: true
Attachment #8918713 - Attachment is obsolete: true
I think we had a test for speculative loading in another bug (test_bug704320_preload.html), so we don't have to wait for fixing bug 1393540. I just move the <link> from head to body in the sjs file and we could test link rel=preload.
Chris, do you mind to take a look at this?
Comment on attachment 8930368 [details]
Bug 1408347 - Add referrer policy test for link rel=preload

https://reviewboard.mozilla.org/r/201510/#review206902

thanks for adding those tests. In general, I am not sure if we should have such tests within dom/base or rather have them within dom/security/test/referrerpolicy, but that's something for a different day.
Attachment #8930368 - Flags: review?(ckerschb) → review+
Pushed by tnguyen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a5640e22d9ea
Add referrer policy test for link rel=preload r=ckerschb
https://hg.mozilla.org/mozilla-central/rev/a5640e22d9ea
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: