Bug 1421507 - Test cases for position:absolute element. r=boris

MozReview-Commit-ID: IRPsvJ5WAQF

--HG--
extra : rebase_source : 5c6988a9af8392cc5abf54e56060dcf9653edffb
This commit is contained in:
Hiroyuki Ikezoe 2018-01-05 10:30:17 +09:00
Родитель 9dfae67fe9
Коммит 9b4b9f9e65
1 изменённых файлов: 46 добавлений и 0 удалений

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

@ -1143,6 +1143,52 @@ waitForAllPaints(() => {
await ensureElementRemoval(scrollDiv);
});
add_task(
async function throttling_animations_in_out_of_view_position_absolute_element() {
if (!offscreenThrottlingEnabled) {
return;
}
var parentDiv = addDiv(null,
{ style: 'position: absolute; top: -1000px;' });
var targetDiv = addDiv(null,
{ style: 'animation: background-color 100s;' });
parentDiv.appendChild(targetDiv);
var animation = targetDiv.getAnimations()[0];
await animation.ready;
var markers = await observeStyling(5);
is(markers.length, 0,
'CSS animation in an out-of-view position absolute element should ' +
'be throttled');
await ensureElementRemoval(parentDiv);
}
);
add_task(
async function throttling_animations_on_out_of_view_position_absolute_element() {
if (!offscreenThrottlingEnabled) {
return;
}
var div = addDiv(null,
{ style: 'animation: background-color 100s; ' +
'position: absolute; top: -1000px;' });
var animation = div.getAnimations()[0];
await animation.ready;
var markers = await observeStyling(5);
is(markers.length, 0,
'CSS animation on an out-of-view position absolute element should ' +
'be throttled');
await ensureElementRemoval(div);
}
);
add_task_if_omta_enabled(
async function no_restyling_for_compositor_animation_on_unrelated_style_change() {
var div = addDiv(null);