Bug 1343589 - Add a crashtest for when reverse() throws
I have verified that this test fails without the fix from the previous patch.
MozReview-Commit-ID: Hx8D72nTb32
new file mode 100644
--- /dev/null
+++ b/dom/animation/test/crashtests/1343589-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<meta charset="UTF-8">
+<script>
+window.onload = function(){
+ let a = document.documentElement.animate(null,
+ { duration: 100, iterations: Number.POSITIVE_INFINITY });
+ a.startTime = 100000; // Set the start time far in the future
+ // Try reversing (this should throw because the target effect end is infinity)
+ try { a.reverse(); } catch(e) {}
+ // Do something that will trigger a timing update
+ a.effect.target = document.createElement("span");
+ document.documentElement.className = '';
+};
+</script>
+</head>
+</html>
--- a/dom/animation/test/crashtests/crashtests.list
+++ b/dom/animation/test/crashtests/crashtests.list
@@ -20,8 +20,9 @@ skip-if(stylo) pref(dom.animations-api.c
pref(dom.animations-api.core.enabled,true) load 1324554-1.html # bug 1311257
skip-if(stylo) pref(dom.animations-api.core.enabled,true) load 1325193-1.html # bug 1311257
skip-if(stylo) pref(dom.animations-api.core.enabled,true) load 1330190-1.html # bug 1311257
skip-if(stylo) pref(dom.animations-api.core.enabled,true) load 1330190-2.html # bug 1311257
skip-if(stylo) pref(dom.animations-api.core.enabled,true) load 1330513-1.html # bug 1311257
skip-if(stylo) pref(dom.animations-api.core.enabled,true) load 1333539-1.html
skip-if(stylo) pref(dom.animations-api.core.enabled,true) load 1333539-2.html
skip-if(stylo) pref(dom.animations-api.core.enabled,true) load 1333418-1.html # bug 1311257
+pref(dom.animations-api.core.enabled,true) load 1343589-1.html