mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 21:28:04 +02:00
Automatic update from web-platform-testsWrap a stray assert (causing harness error) in a test -- wpt-commits: a3eddf0b1e19aa1152e38fdaabf31cbe67d4c6fd wpt-pr: 12304
26 lines
1.3 KiB
HTML
26 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<title>Priority Hints - Image element</title>
|
|
<meta name="author" title="Dominic Farolino" href="mailto:domfarolino@gmail.com">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
|
|
<img id=img1 src=/images/green.png importance=high>
|
|
<img id=img2 src=/images/green.png importance=low>
|
|
<img id=img3 src=/images/green.png importance=auto>
|
|
<img id=img4 src=/images/green.png importance=xyz>
|
|
<img id=img5 src=/images/green.png>
|
|
|
|
<script>
|
|
test(() => {
|
|
assert_equals(img1.importance, "high", "high importance is a valid IDL value on the image element");
|
|
assert_equals(img2.importance, "low", "high importance is a valid IDL value on the image element");
|
|
assert_equals(img3.importance, "auto", "auto importance is a valid IDL value on the image element");
|
|
assert_equals(img4.importance, "auto", "invalid importance reflects as 'auto' IDL attribute on the image element");
|
|
assert_equals(img5.importance, "auto", "missing importance reflects as 'auto' IDL attribute on the image element");
|
|
}, "importance attribute on <img> elements should reflect valid IDL values");
|
|
|
|
test(() => {
|
|
const img = new Image();
|
|
assert_equals(img.importance, "auto");
|
|
}, "importance of new Image() is 'auto'");
|
|
</script>
|