Update web-platform-tests to revision b'ac590e83f80632559480abda677db69b17f6ece1'

This commit is contained in:
WPT Sync Bot 2021-03-11 08:20:29 +00:00
parent 14fbe153e2
commit 56531f4672
148 changed files with 3092 additions and 1755 deletions

View file

@ -39,8 +39,10 @@ The baselines for different widgets, as implemented in Firefox, are as follows:
<input type=checkbox> with 'appearance: auto'
<input type=radio> with 'appearance: auto'
At the border-box edge. (Since baseline at border-box edge isn't a behavior CSS has normally, we
fake it in the references with the 'no-margin-bottom' class.)
At the bottom of the content-box edge (and whether there's a border depends
on the platform).
This is not usually how CSS works so we fake it with a negative margin-bottom.
<input type=color>
At the content-box edge.
@ -85,11 +87,13 @@ The baselines for different widgets, as implemented in Firefox, are as follows:
margin: 10px 0;
/* Note: a border is not specified because that would imply 'appearance: none' for some widgets */
}
.ref button img {
height: 100%;
width: 100%;
display: block;
}
/* Use inline-grid instead of inline-block here to more easily center the text inside */
.ref .fake-input-text {
display: inline-grid;
@ -99,9 +103,11 @@ The baselines for different widgets, as implemented in Firefox, are as follows:
.ref .inline-block {
display: inline-block;
}
.ref td > img.no-margin-bottom {
margin-bottom: 0;
.ref-file-input-like button {
font-size: unset;
}
[style*="appearance: none;"] {
-webkit-appearance: none; /* TODO(zcorpan) remove this when unprefixed appearance is supported */
}
@ -114,7 +120,7 @@ The sibling element is there to control where the baseline for the line box will
-->
<table class="test ref">
<tr class="ref-text-input-like"><td><span>ref-text-input-like</span> <span class=fake-input-text>x</span>
<tr class="ref-checkbox-input-appearance-auto-like"><td><span>ref-checkbox-input-appearance-auto-like</span> <img class=no-margin-bottom src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAMCAIAAAD3UuoiAAAAGklEQVQoz2Nk%2BP%2BfgRqAiYFKYNSgUYOGp0EA%2BQMCFrJdTgsAAAAASUVORK5CYII%3D">
<tr class="ref-checkbox-input-appearance-auto-like"><td><span>ref-checkbox-input-appearance-auto-like</span> <img class=auto-checkbox src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAMCAIAAAD3UuoiAAAAGklEQVQoz2Nk%2BP%2BfgRqAiYFKYNSgUYOGp0EA%2BQMCFrJdTgsAAAAASUVORK5CYII%3D">
<tr class="ref-color-input-like"><td><span>ref-color-input-like</span> <button><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAMCAIAAAD3UuoiAAAAGklEQVQoz2Nk%2BP%2BfgRqAiYFKYNSgUYOGp0EA%2BQMCFrJdTgsAAAAASUVORK5CYII%3D"></button>
<tr class="ref-file-input-like"><td><span>ref-file-input-like</span> <span class=inline-block><button>x</button></span>
<tr class="ref-image-input-showing-alt-overflow-visible-like"><td><span>ref-image-input-showing-alt-overflow-visible-like</span> <span class=inline-block>x</span>
@ -160,6 +166,13 @@ This table gets populated by the script.
const templateTable = document.querySelector('#template-table');
const testTBody = document.querySelector('#test-table tbody');
{
const checkboxBorder = getComputedStyle(document.querySelector("input[type=checkbox]")).borderTopWidth;
const checkboxLike = document.querySelector(".auto-checkbox");
checkboxLike.style.border = checkboxBorder + " solid";
checkboxLike.style.marginBottom = "-" + checkboxBorder;
}
const templateRows = templateTable.querySelectorAll('tr');
for (const templateRow of templateRows) {
for (const appearanceValue of ["auto", "none"]) {
@ -213,14 +226,11 @@ This table gets populated by the script.
for (const row of testTBody.children) {
const input = row.firstChild.lastElementChild;
// FIXME: This test makes assumptions about default form control styling
// that don't hold in all platforms.
const allowedDelta = 3;
// This is not using test() because promise_setup() only allows promise_test().
promise_test(async () => {
assert_equals(input.type, input.getAttribute('type'), 'input type should be supported')
const offsetTopActual = row.firstChild.firstChild.offsetTop;
assert_approx_equals(offsetTopActual, expectedOffsetTop(input), allowedDelta, '<span>.offsetTop');
assert_equals(offsetTopActual, expectedOffsetTop(input), '<span>.offsetTop');
}, testName(input.outerHTML));
}
});