mirror of
https://github.com/servo/servo.git
synced 2025-08-13 09:25:32 +01:00
Update web-platform-tests to revision eb12303bec1d47bbe91ebf011d17d81ec6fce68d
This commit is contained in:
parent
6ca767d7f9
commit
916ba6ef4d
467 changed files with 6716 additions and 1478 deletions
|
@ -25,6 +25,7 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
<script>
|
||||
setup({ explicit_done: true });
|
||||
function setGridTemplate(id, gridTemplateRows, gridTemplateColumns)
|
||||
{
|
||||
var gridElement = document.getElementById(id);
|
||||
|
@ -60,10 +61,9 @@ function testChangingGridDefinitions()
|
|||
|
||||
done();
|
||||
}
|
||||
|
||||
window.addEventListener("load", testChangingGridDefinitions, false);
|
||||
</script>
|
||||
|
||||
<body onload="document.fonts.ready.then(() => { testChangingGridDefinitions(); })">
|
||||
<div id="grid1" class="grid">
|
||||
<div id="item1" class="autoRowAutoColumn">XXXX XXX XX X X</div>
|
||||
</div>
|
||||
|
@ -71,3 +71,4 @@ window.addEventListener("load", testChangingGridDefinitions, false);
|
|||
<div id="grid2" class="grid">
|
||||
<div id="item2" class="autoRowAutoColumn verticalLR">XXXX XXX XX X X</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -26,7 +26,10 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
<body onload="checkLayout('.grid');">
|
||||
<script type="text/javascript">
|
||||
setup({ explicit_done: true });
|
||||
</script>
|
||||
<body onload="document.fonts.ready.then(() => { checkLayout('.grid'); })">
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
|
|
|
@ -19,7 +19,10 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
<body onload="checkLayout('.grid');">
|
||||
<script type="text/javascript">
|
||||
setup({ explicit_done: true });
|
||||
</script>
|
||||
<body onload="document.fonts.ready.then(() => { checkLayout('.grid'); })">
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
setup({explicit_done: true});
|
||||
var {style} = document.getElementById("grid");
|
||||
|
||||
function testGridTemplateColumnsRows(assignedValue, expectedValue = assignedValue) {
|
||||
|
@ -36,31 +37,34 @@ function testGridTemplateColumnsRows(assignedValue, expectedValue = assignedValu
|
|||
}, `grid-template-columns: ${assignedValue}; and grid-template-rows: ${assignedValue};`);
|
||||
}
|
||||
|
||||
// Valid values.
|
||||
testGridTemplateColumnsRows("repeat(1, auto)");
|
||||
testGridTemplateColumnsRows("repeat(2, auto)");
|
||||
testGridTemplateColumnsRows("repeat(2, minmax(50px, calc(50% + 50px)))");
|
||||
testGridTemplateColumnsRows("repeat(5, 10%)");
|
||||
testGridTemplateColumnsRows("max-content repeat(2, 25%) 1fr");
|
||||
testGridTemplateColumnsRows("repeat(2, min-content 50px)");
|
||||
testGridTemplateColumnsRows("repeat(2, [a] minmax(50px, 100px) [b] 25em [c])");
|
||||
testGridTemplateColumnsRows("[a] repeat(2, auto [b] 100px) [c]");
|
||||
testGridTemplateColumnsRows("[a] auto repeat(2, [b] 100px) [c]");
|
||||
testGridTemplateColumnsRows("[a] repeat(2, auto [b]) 100px [c]");
|
||||
testGridTemplateColumnsRows("[a] repeat(2, [b] 100px)");
|
||||
testGridTemplateColumnsRows("[a] repeat(2, [b] auto [c]) [d]");
|
||||
testGridTemplateColumnsRows("[a] min-content repeat(2, [b] 1fr [c] calc(10% + 20px)) [d] minmax(30em, 50em) [e]");
|
||||
document.fonts.ready.then(() => {
|
||||
// Valid values.
|
||||
testGridTemplateColumnsRows("repeat(1, auto)");
|
||||
testGridTemplateColumnsRows("repeat(2, auto)");
|
||||
testGridTemplateColumnsRows("repeat(2, minmax(50px, calc(50% + 50px)))");
|
||||
testGridTemplateColumnsRows("repeat(5, 10%)");
|
||||
testGridTemplateColumnsRows("max-content repeat(2, 25%) 1fr");
|
||||
testGridTemplateColumnsRows("repeat(2, min-content 50px)");
|
||||
testGridTemplateColumnsRows("repeat(2, [a] minmax(50px, 100px) [b] 25em [c])");
|
||||
testGridTemplateColumnsRows("[a] repeat(2, auto [b] 100px) [c]");
|
||||
testGridTemplateColumnsRows("[a] auto repeat(2, [b] 100px) [c]");
|
||||
testGridTemplateColumnsRows("[a] repeat(2, auto [b]) 100px [c]");
|
||||
testGridTemplateColumnsRows("[a] repeat(2, [b] 100px)");
|
||||
testGridTemplateColumnsRows("[a] repeat(2, [b] auto [c]) [d]");
|
||||
testGridTemplateColumnsRows("[a] min-content repeat(2, [b] 1fr [c] calc(10% + 20px)) [d] minmax(30em, 50em) [e]");
|
||||
|
||||
// Reset values.
|
||||
style.gridTemplateColumns = "";
|
||||
style.gridTemplateRows = "";
|
||||
// Reset values.
|
||||
style.gridTemplateColumns = "";
|
||||
style.gridTemplateRows = "";
|
||||
|
||||
// Wrong values.
|
||||
testGridTemplateColumnsRows("repeat(-1, auto)", "");
|
||||
testGridTemplateColumnsRows("repeat(auto, 2)", "");
|
||||
testGridTemplateColumnsRows("repeat 2, auto", "");
|
||||
testGridTemplateColumnsRows("repeat(2 auto)", "");
|
||||
testGridTemplateColumnsRows("100px (repeat 2, auto)", "");
|
||||
testGridTemplateColumnsRows("repeat(2, 50px repeat(2, 100px))", "");
|
||||
testGridTemplateColumnsRows("100px repeat(2, [a])", "");
|
||||
// Wrong values.
|
||||
testGridTemplateColumnsRows("repeat(-1, auto)", "");
|
||||
testGridTemplateColumnsRows("repeat(auto, 2)", "");
|
||||
testGridTemplateColumnsRows("repeat 2, auto", "");
|
||||
testGridTemplateColumnsRows("repeat(2 auto)", "");
|
||||
testGridTemplateColumnsRows("100px (repeat 2, auto)", "");
|
||||
testGridTemplateColumnsRows("repeat(2, 50px repeat(2, 100px))", "");
|
||||
testGridTemplateColumnsRows("100px repeat(2, [a])", "");
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue