mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Update web-platform-tests to revision 3bbb55915a04548e70c63b7c143a83e0e9d3c5e7
This commit is contained in:
parent
3340214a29
commit
b55cc798b6
100 changed files with 2036 additions and 3665 deletions
|
@ -34,7 +34,8 @@ body {
|
|||
image1Observed = 1;
|
||||
const pathname1 = window.location.href.substring(0, index) +
|
||||
'/resources/square100.png';
|
||||
checkElement(entry, pathname1, 'image1', beforeRender);
|
||||
// The images do not contain ID, so expect an empty ID.
|
||||
checkElement(entry, pathname1, 'image1', 'img1', beforeRender);
|
||||
// This image is horizontally centered.
|
||||
// Using abs and comparing to 1 because the viewport sizes could be odd.
|
||||
// If a size is odd, then image cannot be in the pure center, but left
|
||||
|
@ -48,6 +49,7 @@ body {
|
|||
assert_equals(entry.intersectionRect.top, 0, 'top of rect for image1');
|
||||
assert_equals(entry.intersectionRect.bottom,
|
||||
100, 'bottom of rect for image1');
|
||||
checkNaturalSize(entry, 100, 100);
|
||||
}
|
||||
else if (entry.identifier === 'image2') {
|
||||
if (image2Observed) {
|
||||
|
@ -57,9 +59,10 @@ body {
|
|||
image2Observed = 1;
|
||||
const pathname2 = window.location.href.substring(0, index) +
|
||||
'/resources/square20.png';
|
||||
checkElement(entry, pathname2, 'image2', beforeRender);
|
||||
checkElement(entry, pathname2, 'image2', 'img2', beforeRender);
|
||||
// This image should be below image 1, and should respect the margin.
|
||||
checkRect(entry, [50, 250, 250, 450], "of image2");
|
||||
checkNaturalSize(entry, 20, 20);
|
||||
}
|
||||
else if (entry.identifier === 'image3') {
|
||||
if (image3Observed) {
|
||||
|
@ -69,9 +72,10 @@ body {
|
|||
image3Observed = 1;
|
||||
const pathname3 = window.location.href.substring(0, index) +
|
||||
'/resources/circle.svg';
|
||||
checkElement(entry, pathname3, 'image3', beforeRender);
|
||||
checkElement(entry, pathname3, 'image3', 'img3', beforeRender);
|
||||
// This image is just to the right of image2.
|
||||
checkRect(entry, [250, 450, 250, 450], "of image3");
|
||||
checkNaturalSize(entry, 200, 200);
|
||||
}
|
||||
else {
|
||||
assert_unreached("Received an unexpected identifier.");
|
||||
|
@ -87,6 +91,7 @@ body {
|
|||
function addImage(number, source, width=0) {
|
||||
const img = document.createElement('img');
|
||||
img.src = source;
|
||||
// Set a different id and elementtiming value for each image.
|
||||
img.id = 'img' + number;
|
||||
img.setAttribute('elementtiming', 'image' + number);
|
||||
if (width !== 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue