Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 10 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /resource-timing/tentative/initiator-url/static-resource.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resource-timing/resources/observe-entry.js"></script>
<script src="../../resources/test-initiator.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<!-- Empty Blocking Script -->
<script src="../../resources/empty.js?blocking"></script>
<!-- Empty Preloaded Script -->
<link rel="preload" href="../../resources/display_paragraph.js" as="script" />
<!-- Loading arbitrary Empty Blocking Async Script -->
<script async src="../../resources/empty.js?async"></script>
<!-- Loading arbitrary Empty Deferred Script -->
<script defer src="../../resources/empty.js?deferred"></script>
<!-- Loading arbitrary Empty Module Script -->
<script type="module" src="../../resources/empty.js?module"></script>
<!-- Empty Stylesheet -->
<link rel="stylesheet" href="../../resources/empty_style.css?link" />
<script src="../../resources/display_paragraph.js"></script>
<!-- Inline Styles -->
<style>
body {
background-image: url("/images/blue.png?inline-style");
font-family: remoteFont, sans-serif;
}
@font-face {
font-family: remoteFont;
/* This query parameter ensures that the Ahem.ttf is not retrieved from the cache. */
src: url("/fonts/Ahem.ttf?initiator-html");
}
</style>
</head>
<body>
<!-- Loading an arbitrary Image using <img> tag -->
<img
src="/images/blue.png?using-Img-tag"
alt="Sample Image for testing initiator Attribute"
/>
<iframe src="../../resources/green.html"></iframe>
<script>
display_paragraph();
const hostInfo = get_host_info();
const expectedInitiatorUrl = hostInfo["ORIGIN"] +
"/resource-timing/tentative/initiator-url/static-resource.html";
const resources = [
"empty.js?blocking",
"display_paragraph.js",
"empty.js?async",
"empty.js?deferred",
"empty.js?module",
"empty_style.css?link",
"blue.png?inline-style",
"Ahem.ttf?initiator-html",
"blue.png?using-Img-tag",
"green.html",
];
for (const resource of resources) {
initiator_url_test(resource, expectedInitiatorUrl, resource+
" initiatorUrl from static-resource", resource+" timeout");
}
</script>
</body>