wpt / css / CSS2 / lists / list-item-dynamic-color.html

Status: FAIL | Duration: 25ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/CSS2/lists/list-item-dynamic-color.html

<!DOCTYPE html>
<html class="reftest-wait">
<title>CSS Test: list item with dynamically changing `color`</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#lists">
<link rel="match" href="list-item-dynamic-color-ref.html">

<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<style>
ol {
  padding-left: 160px;
}
li {
  font: 64px/1 Ahem;
  list-style-type: square;
  color: red;
}
</style>

<p>Test passes if there are 2 filled green squares and <strong>no red</strong>.</p>
<ol>
  <li id="target">X</li>
</ol>

<script src="/common/reftest-wait.js"></script>
<script>
requestAnimationFrame(() => requestAnimationFrame(() => {
  document.getElementById("target").style.color = "green";
  takeScreenshot();
}));
</script>
</html>

/css/CSS2/lists/list-item-dynamic-color-ref.html

<!DOCTYPE html>
<title>CSS Reference: list item with dynamically changing `color`</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">

<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<style>
ol {
  padding-left: 160px;
}
li {
  font: 64px/1 Ahem;
  list-style-type: square;
  color: green;
}
</style>

<p>Test passes if there are 2 filled green squares and <strong>no red</strong>.</p>
<ol>
  <li>X</li>
</ol>