Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html class="reftest-wait">
<title>View transitions: an in-process iframe that was offscreen when its old state was captured doesn't show its new state while its rendering is suppressed</title>
<link rel="match" href="paint-holding-in-iframe-offscreen-at-capture-ref.html">
<script src="/common/reftest-wait.js"></script>
<script src="/common/rendering-utils.js"></script>
<style>
body {
margin: 0;
background: white;
}
#spacer {
height: 10000px;
}
iframe {
display: block;
width: 300px;
height: 200px;
border: 5px solid black;
}
</style>
<div id="spacer"></div>
<iframe id="inner" srcdoc="<body style='background: blue'></body>"></iframe>
<script>
async function runTest() {
await waitForAtLeastOneFrame();
const contentDocument = inner.contentDocument;
contentDocument.startViewTransition(async () => {
contentDocument.body.style.background = "green";
window.scrollTo(0, inner.offsetTop);
await waitForAtLeastOneFrame();
await waitForAtLeastOneFrame();
takeScreenshot();
return new Promise(() => {});
});
}
onload = runTest;
</script>
</html>