| Index: LayoutTests/web-animations-api/finish-event-after-gc.html
|
| diff --git a/LayoutTests/web-animations-api/finish-event-after-gc.html b/LayoutTests/web-animations-api/finish-event-after-gc.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7cba44fbb539ef19b86c2f9360217699a5c934be
|
| --- /dev/null
|
| +++ b/LayoutTests/web-animations-api/finish-event-after-gc.html
|
| @@ -0,0 +1,22 @@
|
| +<!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>
|
|
|