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/same-origin-from-cross-origin-redirect.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>This test validates resource timing information for a same-origin
resource fetched through a cross-origin redirect chain.</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/resource-loaders.js"></script>
<script src="resources/entry-invariants.js"></script>
</head>
<body>
<script>
const {HTTP_REMOTE_ORIGIN} = get_host_info();
let destUrl = `${HTTP_REMOTE_ORIGIN}/resource-timing/resources/multi_redirect.py?`;
destUrl += `&cross_origin=${HTTP_REMOTE_ORIGIN}`;
destUrl += `&final_resource=/resource-timing/resources/blank-with-tao.html`;
attribute_test(
load.iframe, destUrl,
invariants.assert_same_origin_redirected_from_cross_origin_resource,
"Verify that cross origin resources' timings are exposed when the final " +
"resource at the end of an HTTP redirect chain is same-origin.");
</script>
</body>
</html>