1
0
Fork 0
firefox/testing/web-platform/tests/css/css-view-transitions/paint-holding-in-iframe.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

43 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html class="reftest-wait">
<title>View transitions: display old paint during update callback</title>
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
<link rel="match" href="paint-holding-in-iframe-ref.html">
<link rel="author" href="mailto:khushalsagar@chromium.org">
<script src="/common/reftest-wait.js"></script>
<script src="/common/rendering-utils.js"></script>
<style>
.old {
border: 5px solid black;
}
.new {
border: 5px solid orange;
}
</style>
<iframe id="inner" class="old" srcdoc="
<body>
This is old content
</body>
"></iframe>
<script>
async function runTest() {
await waitForAtLeastOneFrame();
let contentDocument = inner.contentDocument;
contentDocument.body.style.background = "blue";
contentDocument.startViewTransition(async () => {
contentDocument.body.style.background = "green";
contentDocument.body.innerText = "This is new content";
inner.classList.toggle('old');
inner.classList.toggle('new');
takeScreenshot();
return new Promise((resolve) => {});
});
}
onload = runTest;
</script>
</html>