Tests: Resync imported WPT tests

This commit is contained in:
Tim Ledbetter
2026-04-04 17:18:58 +01:00
committed by Shannon Booth
parent dda3cb99b7
commit 504a8e6d1d
Notes: github-actions[bot] 2026-04-04 21:38:15 +00:00
306 changed files with 6274 additions and 2460 deletions

View File

@@ -94,6 +94,9 @@
#pseudo-invalid {
color: rgb(255, 0, 0)
}
#test-file-input::file-selector-button {
color: rgb(0, 128, 0);
}
</style>
<div id="test">
<div id="contents"></div>
@@ -103,6 +106,7 @@
<div id="contents-pseudos"></div>
<div id="contents-pseudos-dynamic"></div>
<ul><li id="pseudo-invalid">Item</li></ul>
<input type="file" id="test-file-input">
</div>
<script>
test(() => {
@@ -291,4 +295,18 @@ test(() => {
`Should return the ::${pseudoIdentifier} style`);
}, `Unknown pseudo-element with a known identifier: ${pseudoIdentifier}`);
});
test(() => {
const fileInput = document.getElementById('test-file-input');
const style = getComputedStyle(fileInput, '::file-selector-button');
assert_equals(style.color, 'rgb(0, 128, 0)',
'::file-selector-button should resolve to the backing element style');
}, '::file-selector-button resolves to the file input button element');
test(() => {
const fileInput = document.getElementById('test-file-input');
const style = getComputedStyle(fileInput, '::-webkit-file-upload-button');
assert_equals(style.length, 0,
'::-webkit-file-upload-button should return empty style');
}, 'Prefixed ::-webkit-file-upload-button does not resolve in getComputedStyle');
</script>