<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<style>
body {
--b: 420px;
}
#element {
--a: var(--b);
width: 100px;
height: 100px;
background-color: red;
transition: width 1s;
}
#element.triggered {
width: var(--a);
}
</style>
<div id='element'></div>
<script>
var test = async_test("this test passes if it doesn't assert");
requestAnimationFrame(x => {
element.classList.add('triggered');
requestAnimationFrame(x => {
requestAnimationFrame(x => {
requestAnimationFrame(x => {
requestAnimationFrame(x => {
test.done();
})
})
})
})
});
</script>