background: none, linear-gradient(to right, red, red);
  }
  .green {
    background: none, linear-gradient(to right, green, green);
  }
</style>
<p>There should be a green square below.</p>
<div id="box" class="red"></div>
<script>
  requestAnimationFrame(function(){
    requestAnimationFrame(function(){
      box.className = "green";
      document.documentElement.classList.remove("reftest-wait");
    });
  });
</script>
