blob: b935eb29587132299b72ba655c89abee5fa74f27 [file]
<!DOCTYPE html>
<html>
<title>View transitions: zoom</title>
<style>
.box {
color: red;
background: lightblue;
width: 100px;
height: 100px;
contain: paint;
position: absolute;
}
#e1 { top: 20px; left: 20px; view-transition-name: e1; }
/* We're verifying what we capture, so just display both captures for 5 minutes. */
html::view-transition-group(*) { animation-duration: 300s; }
html::view-transition-new(*) { animation: unset; opacity: 1; }
html::view-transition-old(*) { animation: unset; opacity: 1; left: 200px; }
/* hide the root so we show transition background to ensure we're in a transition */
html::view-transition-group(root) { animation: unset; opacity: 0; }
html::view-transition { background: lightpink; }
</style>
<div id=e1 class=box></div>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
if (window.internals)
window.internals.setPageZoomFactor(2);
async function runTest() {
await document.startViewTransition(() => { }).ready;
if (window.testRunner)
testRunner.notifyDone();
}
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
</script>