Files
sousa-gecko/testing/web-platform/tests/svg/embedded/attr-image-fetchpriority.optional.html
T
Ahmad Saleem f3ccec05b5 Bug 2045595 [wpt PR 60454] - Make fetchPriority (SVG) tests as optional, a=testonly
Automatic update from web-platform-tests
Make `fetchPriority` (SVG) tests as `optional` (#60454)

These are more of `optional` at the moment especially `script` bit - https://www.w3.org/2026/01/08-svg-minutes.html#cb18
--

wpt-commits: 8421b9a799b2691d872cc6433dd33be520d6fa8d
wpt-pr: 60454
2026-06-23 08:16:47 +00:00

28 lines
1.3 KiB
HTML

<!DOCTYPE html>
<title>Fetch Priority - SVG Image element</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<svg>
<image id=image1 fetchpriority="high"/>
<image id=image2 fetchpriority="low"/>
<image id=image3 fetchpriority="auto"/>
<image id=image4 fetchpriority="xyz"/>
<image id=image5 />
</svg>
<script>
test(() => {
assert_equals(image1.fetchPriority, "high", "high fetchPriority is a valid IDL value on the image element");
assert_equals(image2.fetchPriority, "low", "low fetchPriority is a valid IDL value on the image element");
assert_equals(image3.fetchPriority, "auto", "auto fetchPriority is a valid IDL value on the image element");
assert_equals(image4.fetchPriority, "auto", "invalid fetchPriority reflects as 'auto' IDL attribute on the image element");
assert_equals(image5.fetchPriority, "auto", "missing fetchPriority reflects as 'auto' IDL attribute on the image element");
}, "fetchpriority attribute on <image> elements should reflect valid IDL values");
test(() => {
const image = document.createElementNS("http://www.w3.org/2000/svg", "image");
assert_equals(image.fetchPriority, "auto");
}, "default fetchpriority attribute on <image> elements should be 'auto'");
</script>