Bug 1341985 - Use registerCleanupFunction to restore to normal refresh mode. r=heycam

Otherwise, the refresh driver left under test mode when a javascript error
occurs in the middle of tests.

MozReview-Commit-ID: J7oUuuYhTZ1

--HG--
extra : rebase_source : 16467b780007eeacd0e70f581ca01ab6f778dfd7
This commit is contained in:
Hiroyuki Ikezoe 2017-03-10 12:12:54 +09:00
Родитель 2eb4e20a24
Коммит 82007eb538
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -231,6 +231,10 @@ window.new_div = function(style) {
// take over the refresh driver right from the start.
advance_clock(0);
SimpleTest.registerCleanupFunction(() => {
SpecialPowers.DOMWindowUtils.restoreNormalRefresh();
});
/*
* css3-animations: 2. Animations
* http://dev.w3.org/csswg/css3-animations/#animations
@ -2095,8 +2099,6 @@ div.style.animation = "\"none\" 1s linear";
is(cs.getPropertyValue("left"), "7px", "animation name 'none' as string is accepted");
done_div();
SpecialPowers.DOMWindowUtils.restoreNormalRefresh();
</script>
</pre>
</body>