Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

  • This test has a WPT meta file that expects 1 subtest issues.
  • This WPT test may be referenced by the following Test IDs:
<!DOCTYPE html>
<link rel=author href="mailto:jarhar@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<select>
<option>option</option>
</select>
<style>
select, ::picker(select) {
appearance: base-select;
}
::picker(select) {
color: white;
}
.animate::picker(select) {
transition: color 100s steps(2, start);
}
@starting-style {
.animate::picker(select) {
color: black;
}
}
</style>
<script>
const select = document.querySelector('select');
const option = document.querySelector('option');
promise_test(async () => {
await new Promise(requestAnimationFrame);
select.classList.add('animate');
await test_driver.click(select);
await new Promise(requestAnimationFrame);
await new Promise(requestAnimationFrame);
const style = getComputedStyle(option);
assert_equals(style.color, 'rgb(128, 128, 128)',
'color should transition based on @starting-style.');
}, '@starting-style should work on ::picker(select) just like a popover.');
</script>