tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

softnav-between-lcp-render-and-paint.tentative.html (1161B)


      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 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
     12 </head>
     13 <body>
     14  <main id=main>
     15    <div>
     16      <a id=link><img src="/images/lcp-256x256.png"></a>
     17    </div>
     18  </main>
     19  <script>
     20    testSoftNavigation({
     21      testName: "Test that an image LCP followed by a smaller soft navigation LCP"
     22        + " properly queues an LCP entry, even when the soft navigation is"
     23        + " detected between the LCP's render and paint.",
     24      addContent: async () => {
     25        // Add an LCP element, but have it be small enough to not trigger the
     26        // Soft Navigation heuristics.
     27        const p = addTextParagraphToMain("Lorem Ipsu");
     28        requestAnimationFrame(() => {
     29          const p2 = addTextParagraphToMain("m");
     30        });
     31      },
     32      });
     33  </script>
     34 </body>
     35 </html>