Bug 1371450 - Crash test. r?emilio
The crash test causes a panic in Servo_ResolveStyle on debug build without this
patch series. The reason why we send mouse move event twice is that one for
E10S and the other one is for non-E10S. It seems to be caused by being
requestIdleCallback processed on different timing.
MozReview-Commit-ID: 7cBmwhE9HDk
new file mode 100644
--- /dev/null
+++ b/layout/style/crashtests/1371450-1.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<title></title>
+<style>
+@keyframes anim {
+ to { transform: rotate(360deg); }
+}
+#animation {
+ animation: anim 3s infinite;
+}
+.red {
+ color: red;
+}
+</style>
+<div><span id="target">text</span></div>
+<div id="animation">animation</div>
+<script>
+window.addEventListener('load', () => {
+ var target = document.getElementById('target');
+ target.classList.add('red');
+ requestIdleCallback(() => {
+ target.classList.remove('red');
+ SpecialPowers.getDOMWindowUtils(window)
+ .sendMouseEvent("mousemove", 100, 100, 1,
+ 0, 1, 0);
+ requestIdleCallback(() => {
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ });
+ SpecialPowers.getDOMWindowUtils(window)
+ .sendMouseEvent("mousemove", 100, 100, 1,
+ 0, 1, 0);
+});
+</script>
--- a/layout/style/crashtests/crashtests.list
+++ b/layout/style/crashtests/crashtests.list
@@ -166,16 +166,17 @@ HTTP load 1320423-1.html
load 1321357-1.html
load 1328535-1.html
load 1331272.html
HTTP load 1333001-1.html
pref(dom.animations-api.core.enabled,true) load 1340344.html
load 1342316-1.html
load 1356601-1.html
load 1370793-1.xhtml
+load 1371450-1.html
load 1374175-1.html
load content-only-on-link-before.html
load content-only-on-visited-before.html
load 1375812-1.html
load 1377053-1.html
load 1377256-1.html
load 1378814.html
load 1380800.html