Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 3 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /resource-timing/tentative/initiator-url/inline-script.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>Resource Timing - initiatorUrl for resources loaded by an inline script</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="../../resources/test-initiator.js"></script>
<div id="log"></div>
<script>
const label = "no_cache_inline_script";
const ifr = document.createElement("iframe");
document.body.appendChild(ifr);
ifr.src = "resources/blank_page_green.html?" + label;
const link = document.createElement("link");
link.rel = "stylesheet";
link.href = "../../resources/empty_style.css?" + label;
document.head.appendChild(link);
const img = document.createElement("img");
img.src = "/images/blue.png?" + label;
document.body.appendChild(img);
const resources = [
"blank_page_green.html?" + label,
"empty_style.css?" + label,
"blue.png?" + label,
];
const expectedInitiatorUrl = getUrl(
"/resource-timing/tentative/initiator-url/inline-script.html");
for (const resource of resources) {
initiator_url_test(resource, expectedInitiatorUrl, resource +
" initiatorUrl from inline-script", resource + " timeout");
}
</script>