Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /resource-timing/tentative/initiator-url/post-task.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>Resource Timing - initiatorUrl for a resource fetched in a scheduler.postTask() callback</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>
<script src="../../resources/loading-resource-lib.js"></script>
<div id="log"></div>
<script>
const img = document.createElement("img");
document.body.appendChild(img);
const label = "initiator_url_posttask";
const resource = "/images/blue.png?" + label;
const expectedInitiatorUrl = getUrl(
"/resource-timing/tentative/initiator-url/post-task.html");
scheduler.postTask(function() {load_image(label, img);});
initiator_url_test(resource, expectedInitiatorUrl, resource +
" initiatorUrl from postTask()", resource + " timeout");
</script>