blob: 89624869b21fcb0070b0e3efa582ac1c9d8c81ff [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<body>
<script>
var layoutTest = async_test('Finish event should be delivered even if a GC occurs. This test passes if it does not time out.');
var events = 0;
function finish() {
if (window.GCController)
GCController.collect();
if (++events == 2)
layoutTest.done();
}
// Use a distinct, unreferenced instance of the handler function.
document.body.animate([]).onfinish = finish.bind();
document.body.animate([]).onfinish = finish.bind();
if (window.GCController)
GCController.collect();
</script>