forked from web-platform-tests/wpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Iframes with missing redirect location should fire load event and que…
…ue RT entry (web-platform-tests#33317) * Iframes with missing redirect location should fire load event and queue RT entry See whatwg/html#7531 * Rename and use loader
- Loading branch information
1 parent
885525b
commit 0ae1d76
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def main(request, response): | ||
response.status = 302 |