wpt / css / css-ui / accent-color-invalidation-currentcolor.html

Status: PASS | Duration: 7ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-ui/accent-color-invalidation-currentcolor.html

<!DOCTYPE html>
<html class="reftest-wait">
<link rel=help href="https://bugs.chromium.org/p/chromium/issues/detail?id=1225661">
<link rel=author href="mailto:jarhar@chromium.org">
<link rel=match href="accent-color-invalidation-currentcolor-ref.html">

<div style="accent-color: currentColor">
  The following checkbox should be red: <input type=checkbox checked>
</div>

<script>
async function rAF() {
  return new Promise(resolve => requestAnimationFrame(resolve));
}

(async () => {
  await rAF();
  await rAF();
  document.querySelector('input').style = 'color: red';
  await rAF();
  await rAF();
  document.documentElement.classList.remove('reftest-wait');
})();
</script>

/css/css-ui/accent-color-invalidation-currentcolor-ref.html

<!DOCTYPE html>
<div style="accent-color: red">
  The following checkbox should be red: <input type=checkbox checked>
</div>