gecko-dev/layout/style/crashtests/1378064-1.html
Hiroyuki Ikezoe e18f89a758 Bug 1381431 - Crashtest that takes snapshots. r=emilio
This test case takes snapshots so that the snapshots were handled during
animation-only restyle without prior patches in this patch series. That means
this test crashed without those prior patches.
To be clear, below assertions were hit respectively.

  debug_assert!(!shared_context.traversal_flags.for_animation_only()) in
  invalidate_style_if_needed()

  debug_assert!(element.has_current_styles(&*data) in Servo_ResolveStyle()

MozReview-Commit-ID: AfwQiNcVWji

--HG--
extra : rebase_source : b744bbe0b91ac2bc8c714a5161f3c29bfa5a9cd8
2017-07-18 20:56:15 +09:00

39 lines
889 B
HTML

<!DOCTYPE html>
<html class="reftest-wait">
<title></title>
<style>
@keyframes anim {
to { transform: rotate(360deg); }
}
span {
color: black;
animation: anim 3s infinite;
}
span.red {
color: red;
}
</style>
<div>
<span id="target">text</span>
<span>text</span>
</div>
<script>
window.addEventListener('load', () => {
var target = document.getElementById('target');
target.classList.add('red');
requestAnimationFrame(() => {
target.classList.remove('red');
SpecialPowers.getDOMWindowUtils(window)
.sendMouseEvent("mousemove", 100, 100, 1,
0, 1, 0);
requestAnimationFrame(() => {
document.documentElement.classList.remove("reftest-wait");
});
});
SpecialPowers.getDOMWindowUtils(window)
.sendMouseEvent("mousemove", 100, 100, 1,
0, 1, 0);
});
</script>