Bug 1418867 - Crash test for the case where the parent element has no style data for pseudo. r=emilio
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 22 Nov 2017 12:20:15 +0900
changeset 701867 00a08154f505461f6424fd6f5254bffd997b3db4
parent 701866 0fe9ca39473a4c71adaa53d6c9e41552ccab6099
child 701868 de1df00a5bba7c3d1d5e325d88e40cbd12bcb734
push id90298
push userbmo:bpostelnicu@mozilla.com
push dateWed, 22 Nov 2017 10:54:01 +0000
reviewersemilio
bugs1418867
milestone59.0a1
Bug 1418867 - Crash test for the case where the parent element has no style data for pseudo. r=emilio MozReview-Commit-ID: 977gqyZTob2
layout/style/crashtests/1418867.html
layout/style/crashtests/crashtests.list
new file mode 100644
--- /dev/null
+++ b/layout/style/crashtests/1418867.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<style>
+@keyframes anim {
+  to { transform: rotate(360deg); }
+}
+.document-ready div::after {
+  display: none;
+}
+div::after {
+  content: "";
+}
+.animation::after {
+  animation: anim 1s infinite;
+}
+</style>
+<div id="target"></div>
+<script>
+window.addEventListener('load', () => {
+  target.classList.add('animation');
+  const psuedo = document.getAnimations()[0].effect.target;
+  target.classList.remove('animation');
+
+  psuedo.animate([ { transform: 'rotate(360deg)' } ], 1000);
+  requestAnimationFrame(() => {
+    document.documentElement.classList.add('document-ready');
+    requestAnimationFrame(() => {
+      document.documentElement.classList.remove('reftest-wait');
+    });
+  });
+});
+</script>
+</html>
--- a/layout/style/crashtests/crashtests.list
+++ b/layout/style/crashtests/crashtests.list
@@ -259,8 +259,9 @@ load 1410226-2.html
 load 1411143.html
 load 1411478.html
 load 1413288.html
 load 1413361.html
 load 1415663.html
 pref(dom.webcomponents.enabled,true) load 1415353.html
 load 1415021.html # This should have dom.webcomponents.enabled=true, but it leaks the world, see bug 1416296.
 load 1418059.html
+skip-if(!stylo) test-pref(dom.animations-api.core.enabled,true) load 1418867.html