text-lcp-followed-by-anim-image-softnav-lcp.tentative.html (1109B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Detect simple soft navigation.</title> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <script src="/resources/testdriver.js"></script> 9 <script src="/resources/testdriver-vendor.js"></script> 10 <script src="resources/soft-navigation-helper.js"></script> 11 </head> 12 <body> 13 <main id=main> 14 <div> 15 <a id=link style="font-size: 4em">Click me!</a> 16 </div> 17 </main> 18 <script> 19 const link = document.getElementById("link"); 20 testSoftNavigation({ 21 testName: "Test that a text LCP followup by an animaged image " 22 + " properly queues a soft navigation entry", 23 addContent: async () => { 24 const main = document.getElementById("main"); 25 main.removeChild(document.getElementsByTagName("div")[0]); 26 const img = new Image(500, 500); 27 img.src = "/images/anim-gr.png?" + Math.random(); 28 img.id = "imagelcp"; 29 img.setAttribute("elementtiming", "imagelcp"); 30 main.appendChild(img); 31 }, 32 }); 33 </script> 34 </body> 35 </html>