root-element-transition-iframe-cross-origin.sub.html (1195B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <title>View transitions: basic cross-document navigation in a cross-origin iframe</title> 4 <link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/"> 5 <link rel="author" href="mailto:khushalsagar@chromium.org"> 6 <link rel="match" href="root-element-transition-iframe-ref.html"> 7 <script src="/common/reftest-wait.js"></script> 8 <script src="resources/common.js"></script> 9 <script src="/common/get-host-info.sub.js"></script> 10 11 <iframe id="inner"></iframe> 12 <script> 13 async function runTest() { 14 let frame = document.getElementById("inner"); 15 16 let frameLoaded = waitForMessage("loaded"); 17 frame.src = get_host_info().HTTP_REMOTE_ORIGIN + "/css/css-view-transitions/navigation/resources/root-element-transition-iframe.html?blue"; 18 await frameLoaded; 19 frame.contentWindow.postMessage("checkrendering", '*'); 20 await waitForMessage("rendered"); 21 22 frame.src = get_host_info().HTTP_REMOTE_ORIGIN + "/css/css-view-transitions/navigation/resources/root-element-transition-iframe.html?grey"; 23 await waitForMessage("transition"); 24 25 takeScreenshot(); 26 } 27 onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest)); 28 </script> 29 </html>