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
This commit is contained in:
Hiroyuki Ikezoe 2017-07-18 20:56:15 +09:00
Родитель 607348ba52
Коммит e18f89a758
2 изменённых файлов: 39 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,38 @@
<!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>

Просмотреть файл

@ -178,6 +178,7 @@ load content-only-on-visited-before.html
load 1375812-1.html
load 1377053-1.html
load 1377256-1.html
load 1378064-1.html
load 1378814.html
load 1380800.html
load link-transition-before.html