Bug 1343589 - Add a crashtest for when reverse() throws draft
authorBrian Birtles <birtles@gmail.com>
Tue, 28 Mar 2017 14:51:52 +0900
changeset 552238 ae9aa20c7ed0ff7aeb3a02217877121f57c74d44
parent 552237 84df06f0196f7cf501ce19946e84ccef04dcd124
child 552239 f5dd13805dea7e833654b23e31bdf328542f0003
push id51295
push userbbirtles@mozilla.com
push dateTue, 28 Mar 2017 06:38:47 +0000
bugs1343589
milestone55.0a1
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
dom/animation/test/crashtests/1343589-1.html
dom/animation/test/crashtests/crashtests.list
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