Update web-platform-tests to revision 3bbb55915a04548e70c63b7c143a83e0e9d3c5e7

This commit is contained in:
WPT Sync Bot 2019-04-01 22:33:23 -04:00
parent 3340214a29
commit b55cc798b6
100 changed files with 2036 additions and 3665 deletions

View file

@ -20,19 +20,21 @@ body {
const index = window.location.href.lastIndexOf('/');
const pathname = window.location.href.substring(0, index) +
'/resources/square100.png';
checkElement(entry, pathname, 'my_image', beforeRender);
checkElement(entry, pathname, 'my_image', 'my_id', beforeRender);
// Assume viewport has size at least 100, so the element is fully visible.
checkRect(entry, [0, 100, 0, 100]);
checkNaturalSize(entry, 100, 100);
})
);
observer.observe({entryTypes: ['element']});
// We add the image during onload to be sure that the observer is registered
// in time for it to observe the element timing.
window.onload = () => {
// Add image of width and height equal to 100.
// Add image of width equal to 100 and height equal to 100.
const img = document.createElement('img');
img.src = 'resources/square100.png';
img.setAttribute('elementtiming', 'my_image');
img.setAttribute('id', 'my_id');
document.body.appendChild(img);
beforeRender = performance.now();
};