<!DOCTYPE html>
<style>
#test { transition: width 1s; }
</style>

<pre>This test checks that a heap-use-after-free crash does not occur on Valgrind when disposing a calc transition.
This test passes if it does not crash under ASAN.</pre>
<div id="test"></div>

<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}
test.style.width = 'calc(100px + 100%)';
requestAnimationFrame(function () {
    test.style.width = '100px';
    requestAnimationFrame(function () {
        document.body.removeChild(test);
        if (window.testRunner)
            testRunner.notifyDone();
    });
});
</script>
