Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link header preload on a subresource triggers a preload #6933

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions preload/link-header-on-subresource.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/preload/resources/preload_helper.js"></script>
<script>
var t = async_test('Makes sure that Link headers on subresources preload resources');
</script>
<link rel=stylesheet href="resources/dummy-preloads-subresource.css?link-header-on-subresource">
<script src="resources/dummy.js?pipe=trickle(d5)&link-header-on-subresources"></script>
<script>
window.addEventListener("load", t.step_func(function() {
verifyPreloadAndRTSupport();
verifyNumberOfDownloads("/preload/resources/CanvasTest.ttf?link-header-on-subresource", 1);
t.done();
}));
</script>

1 change: 1 addition & 0 deletions preload/resources/dummy-preloads-subresource.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* This is just a dummy, empty CSS file */
2 changes: 2 additions & 0 deletions preload/resources/dummy-preloads-subresource.css.sub.headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Cache-Control: max-age=1000
Link: </preload/resources/CanvasTest.ttf?link-header-on-subresource>; rel=preload;as=font;crossorigin