Skip to content

Truly independent web browser

903 B
Raw Blame
<!DOCTYPE html>
<script src="../../include.js"></script>
<script src="frame-in-flight.js"></script>
<div id="box" style="width: 10px; height: 0px; background: green"></div>
<script>
    // A garbage collection beside a clock lane finalizes what it finalizes without reaching the render state the lane
    // forked, and the lane ticks on.
    asyncTest(async done => {
        const result = await whileLaneAnimates(() => {
            return box.animate([{ height: "0px" }, { height: "100px" }], { duration: 10000, easing: "linear" });
        }, frameTime => {
            for (let i = 0; i < 100; ++i)
                document.createElement("div");
            internals.gc();
            internals.injectClockTick(frameTime + 500);
            return internals.clockLaneState(document);
        });
        println(`lane after a collection and a tick: ${result}`);
        done();
    });
</script>