зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1564713 [wpt PR 17562] - [ElementTiming] Check opacity of image before exposing, a=testonly
Automatic update from web-platform-tests [ElementTiming] Check opacity of image before exposing Before CompositeAfterPaint, we would just rely on painting being skipped when an image has opacity:0. Now, we need to explicitly check because paint is no longer being skipped. Bug: 959949, 879270 Change-Id: I57590798e7f76c4c63a6062f145f95fa1eec6c3a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1680867 Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#674252} -- wpt-commits: 1e05bb271ae12717e383a6e3da625127cb88dcd0 wpt-pr: 17562
This commit is contained in:
Родитель
808f0fc19c
Коммит
98739d2ad4
|
@ -20,9 +20,10 @@
|
|||
assert_unreached("PerformanceElementTiming is not implemented");
|
||||
}
|
||||
const observer = new PerformanceObserver(
|
||||
t.step_func_done(() => {
|
||||
t.step_func_done((entries) => {
|
||||
// The image should not have caused an entry, so fail test.
|
||||
assert_unreached('Should not have received an entry!');
|
||||
assert_unreached('Should not have received an entry! Received one with identifier '
|
||||
+ entries.getEntries()[0].identifier);
|
||||
})
|
||||
);
|
||||
observer.observe({entryTypes: ['element']});
|
||||
|
@ -46,6 +47,30 @@
|
|||
img3.setAttribute('elementtiming', 'my_image3');
|
||||
img3.setAttribute('id', 'displayNone');
|
||||
document.body.appendChild(img3);
|
||||
|
||||
const div = document.createElement('div');
|
||||
div.setAttribute('id', 'opacity0');
|
||||
const img4 = document.createElement('img');
|
||||
img4.src = '/images/blue.png';
|
||||
img4.setAttribute('elementtiming', 'my_image4');
|
||||
div.appendChild(img4);
|
||||
document.body.appendChild(div);
|
||||
|
||||
const div2 = document.createElement('div');
|
||||
div2.setAttribute('id', 'visibilityHidden');
|
||||
const img5 = document.createElement('img');
|
||||
img5.src = '/images/blue.png';
|
||||
img5.setAttribute('elementtiming', 'my_image5');
|
||||
div.appendChild(img5);
|
||||
document.body.appendChild(div2);
|
||||
|
||||
const div3 = document.createElement('div');
|
||||
div3.setAttribute('id', 'displayNone');
|
||||
const img6 = document.createElement('img');
|
||||
img6.src = '/images/blue.png';
|
||||
img6.setAttribute('elementtiming', 'my_image6');
|
||||
div.appendChild(img6);
|
||||
document.body.appendChild(div3);
|
||||
// Images have been added but should not cause entries to be dispatched.
|
||||
// Wait for 500ms and end test, ensuring no entry was created.
|
||||
t.step_timeout(() => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче