attr-image-fetchpriority.html (1302B)
1 <!DOCTYPE html> 2 <title>Fetch Priority - SVG Image element</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 6 <svg> 7 <image id=image1 fetchpriority="high"/> 8 <image id=image2 fetchpriority="low"/> 9 <image id=image3 fetchpriority="auto"/> 10 <image id=image4 fetchpriority="xyz"/> 11 <image id=image5 /> 12 </svg> 13 14 <script> 15 test(() => { 16 assert_equals(image1.fetchPriority, "high", "high fetchPriority is a valid IDL value on the image element"); 17 assert_equals(image2.fetchPriority, "low", "low fetchPriority is a valid IDL value on the image element"); 18 assert_equals(image3.fetchPriority, "auto", "auto fetchPriority is a valid IDL value on the image element"); 19 assert_equals(image4.fetchPriority, "auto", "invalid fetchPriority reflects as 'auto' IDL attribute on the image element"); 20 assert_equals(image5.fetchPriority, "auto", "missing fetchPriority reflects as 'auto' IDL attribute on the image element"); 21 }, "fetchpriority attribute on <image> elements should reflect valid IDL values"); 22 23 test(() => { 24 const image = document.createElementNS("http://www.w3.org/2000/svg", "image"); 25 assert_equals(image.fetchPriority, "auto"); 26 }, "default fetchpriority attribute on <image> elements should be 'auto'"); 27 </script>