Skip to content

Commit

Permalink
Bug 1760951 [wpt PR 33317] - Iframes with missing redirect location s…
Browse files Browse the repository at this point in the history
…hould fire load event and queue RT entry, a=testonly

Automatic update from web-platform-tests
Iframes with missing redirect location should fire load event and queue RT entry (#33317)

* Iframes with missing redirect location should fire load event and queue RT entry

See whatwg/html#7531

* Rename and use loader
--

wpt-commits: 7eb2cb2120e6cd172ad10edb7f38518e765daf49
wpt-pr: 33317
  • Loading branch information
noamr authored and moz-wptsync-bot committed Mar 26, 2022
1 parent 990599f commit d10f934
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,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>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def main(request, response):
response.status = 302

0 comments on commit d10f934

Please sign in to comment.