<!DOCTYPE html>
<style>
body {
    width: 50px;
}
#test {
    float: left;
    display: none;
}
.block {
    display: block !important;
}
</style>
<script>
window.onload = function () {
    var test = document.getElementById('test');
    test.classList.remove('block');
    test.offsetTop;
    test.classList.add('block');
    test.offsetTop;
    test.classList.remove('block');
    test.offsetTop;
    test.classList.add('block');
    test.offsetTop;
    if (window.testRunner)
        testRunner.dumpAsText();
};
</script>
<body><img src="../resources/50x50.gif"/>
    <div id="test" class="block">Test passes if no assertion.</div>

