1
0
Fork 0
firefox/testing/web-platform/tests/css/cssom/getComputedStyle-pseudo-picker-icon.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

46 lines
1.4 KiB
HTML

<!doctype html>
<meta charset="utf-8">
<title>CSSOM: Correct resolution of resolved value for the picker-icon pseudo-element</title>
<link rel="help" href="https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle">
<link rel="help" href="https://drafts.csswg.org/cssom/#resolved-values">
<link rel="help" href="https://drafts.csswg.org/css-forms/#picker-icon-pseudo-element">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<style>
select,
select::picker(select) {
appearance: base-select;
}
#test-select {
width: 321px;
}
#test-select::picker-icon {
width: 13px;
}
</style>
<select id="test-select">
<option>The only option</option>
</select>
<script>
test(() => {
const test_select = document.getElementById('test-select');
assert_equals(getComputedStyle(test_select, "picker-icon").width, "321px");
}, "Resolution of width is correct when pseudo-element argument is ignored (due to no colon)");
test(() => {
const test_select = document.getElementById('test-select');
assert_equals(getComputedStyle(test_select, ":picker-icon").width, "");
}, "Resolution of width is correct when pseudo-element argument is ignored (due to single-colon)");
test(() => {
const test_select = document.getElementById('test-select');
assert_equals(getComputedStyle(test_select, "::picker-icon").width, "13px");
}, "Resolution of width is correct for pseudo-element (due to double-colon)");
</script>