Files
sousa-gecko/testing/web-platform/tests/speculation-rules/prerender/iframe-added-post-activation.https.html
T
Sam Sneddon 5bbaff2951 Bug 2032349 [wpt PR 59217] - Speculation Rules prerender tests should check for support, a=testonly
Automatic update from web-platform-tests
Speculation Rules prerender tests should check for support

We're seeing timeouts on the STP bots, because spending over an hour
timing out on speculation rules tests just eats into the timeout.

--

wpt-commits: 9f7999f4b3dd412a338f3231228e64230d6a6531
wpt-pr: 59217
2026-04-23 10:14:37 +00:00

33 lines
1.0 KiB
HTML

<!DOCTYPE html>
<!--
Tests that an iframe added after activation starts out with
document.prerendering false.
-->
<title>iframe added after activation</title>
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/utils.js"></script>
<script src="../resources/utils.js"></script>
<script src="resources/utils.js"></script>
<body>
<script>
setup(() => assertSpeculationRulesIsSupported('prerender'));
promise_test(async t => {
const uid = token();
const channel = new PrerenderChannel('test-channel', uid);
const messageQueue = new BroadcastMessageQueue(channel);
t.add_cleanup(_ => channel.close());
// Make the window to start the prerender.
const url = `resources/iframe-added-post-activation.html?uid=${uid}`;
window.open(url, '_blank', 'noopener');
// Wait for done.
const msg = await messageQueue.nextMessage();
assert_equals(msg, 'PASS');
}, 'iframe added after activation has false document.prerendering');
</script>