tor-browser

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

attr-img-fetchpriority.html (1345B)


      1 <!DOCTYPE html>
      2 <title>Fetch Priority - Image element</title>
      3 <meta name="author" title="Dominic Farolino" href="mailto:domfarolino@gmail.com">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 
      7 <img id=img1 src=/images/green.png fetchpriority=high>
      8 <img id=img2 src=/images/green.png fetchpriority=low>
      9 <img id=img3 src=/images/green.png fetchpriority=auto>
     10 <img id=img4 src=/images/green.png fetchpriority=xyz>
     11 <img id=img5 src=/images/green.png>
     12 
     13 <script>
     14  test(() => {
     15    assert_equals(img1.fetchPriority, "high", "high fetchPriority is a valid IDL value on the image element");
     16    assert_equals(img2.fetchPriority, "low", "low fetchPriority is a valid IDL value on the image element");
     17    assert_equals(img3.fetchPriority, "auto", "auto fetchPriority is a valid IDL value on the image element");
     18    assert_equals(img4.fetchPriority, "auto", "invalid fetchPriority reflects as 'auto' IDL attribute on the image element");
     19    assert_equals(img5.fetchPriority, "auto", "missing fetchPriority reflects as 'auto' IDL attribute on the image element");
     20  }, "fetchpriority attribute on <img> elements should reflect valid IDL values");
     21 
     22  test(() => {
     23    const img = new Image();
     24    assert_equals(img.fetchPriority, "auto");
     25  }, "fetchPriority of new Image() is 'auto'");
     26 </script>