| Index: third_party/WebKit/LayoutTests/web-animations-api/animation-finish-promise-gc.html
|
| diff --git a/third_party/WebKit/LayoutTests/web-animations-api/animation-finish-promise-gc.html b/third_party/WebKit/LayoutTests/web-animations-api/animation-finish-promise-gc.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3ef98fe804f30cf31d29b7d04eaccc95e2e334ad
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/web-animations-api/animation-finish-promise-gc.html
|
| @@ -0,0 +1,25 @@
|
| +<!DOCTYPE html>
|
| +<meta charset=utf-8>
|
| +<title>Garbage collect an animation with a finish promise</title>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<body>
|
| +<script>
|
| +function gc()
|
| +{
|
| + return GCController.collectAll();
|
| +}
|
| +
|
| +async_test(t => {
|
| + assert_exists(window, "GCController", "gc controller needed");
|
| + setInterval(gc, 0);
|
| +
|
| + var anim = document.body.animate(null, 1);
|
| + var promise = anim.finished;
|
| +
|
| + promise.then(() => {
|
| + t.done();
|
| + });
|
| +}, 'Animation finish promise resolved if animation is garbage collected');
|
| +</script>
|
| +</body>
|
|
|