summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/resource-timing/iframe-redirect-without-location.html
blob: bae5f3112fe2917b66d5994bdf3bf6e7a86b0376 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<meta charset="utf-8">
<title>Test the sequence of events when reporting iframe timing.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/resource-loaders.js"></script>
<body>
<script>
    promise_test(async t => {
        const href = new URL('resources/redirect-without-location.py', location.href);
        await load.iframe(href);
        const entries = performance.getEntriesByType('resource').filter(({name}) => name.startsWith(href));
        assert_equals(entries.length, 1);
        assert_equals(entries[0].initiatorType, 'iframe');
    }, 'Iframes should report resource timing for redirect responses without a location');
</script>
</body>