mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision b'b728032f59a396243864b0f8584e7211e3632005'
This commit is contained in:
parent
ace9b32b1c
commit
df68c4e5d1
15632 changed files with 514865 additions and 155000 deletions
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Custom Properties: Using revert in fallbacks</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-variables/#substitute-a-var">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
body.revert {
|
||||
--x:FAIL;
|
||||
margin: -1px;
|
||||
display: grid;
|
||||
|
||||
--x: var(--unknown, revert);
|
||||
margin: var(--unknown, revert);
|
||||
display: var(--unknown, revert);
|
||||
}
|
||||
</style>
|
||||
<html>
|
||||
<body>
|
||||
<pre id=out></pre>
|
||||
<script>
|
||||
let body_ua_display = getComputedStyle(document.body).display;
|
||||
let body_ua_margin = getComputedStyle(document.body).margin;
|
||||
document.body.classList.add('revert');
|
||||
|
||||
test((t) => {
|
||||
assert_equals(getComputedStyle(document.body).getPropertyValue('--x'), '');
|
||||
}, 'var(--unknown, revert) in custom property');
|
||||
|
||||
test((t) => {
|
||||
assert_equals(getComputedStyle(document.body).getPropertyValue('margin'), body_ua_margin);
|
||||
}, 'var(--unknown, revert-layer) in shorthand');
|
||||
|
||||
test((x) => {
|
||||
assert_equals(getComputedStyle(document.body).getPropertyValue('margin-left'), body_ua_margin);
|
||||
}, 'var(--unknown, revert-layer) in shorthand observed via longhand');
|
||||
|
||||
test((t) => {
|
||||
assert_equals(getComputedStyle(document.body).getPropertyValue('display'), body_ua_display);
|
||||
}, 'var(--unknown, revert-layer) in longhand');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Custom Properties: Using revert-layer in fallbacks</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-variables/#substitute-a-var">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
@layer {
|
||||
#child {
|
||||
--x:PASS;
|
||||
margin: 1px;
|
||||
padding-left: 1px;
|
||||
}
|
||||
}
|
||||
@layer {
|
||||
#parent {
|
||||
--x:FAIL;
|
||||
margin: -1px;
|
||||
padding-left: -1px;
|
||||
}
|
||||
#child {
|
||||
--x: var(--unknown, revert-layer);
|
||||
margin: var(--unknown, revert-layer);
|
||||
padding-left: var(--unknown, revert-layer);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div id=parent>
|
||||
<div id=child>
|
||||
</div>
|
||||
</div>
|
||||
<pre id=out>
|
||||
</pre>
|
||||
<script>
|
||||
test((x) => {
|
||||
assert_equals(getComputedStyle(child).getPropertyValue('--x'), 'PASS');
|
||||
}, 'var(--unknown, revert-layer) in custom property');
|
||||
|
||||
test((x) => {
|
||||
assert_equals(getComputedStyle(child).getPropertyValue('margin'), '1px');
|
||||
}, 'var(--unknown, revert-layer) in shorthand');
|
||||
|
||||
test((x) => {
|
||||
assert_equals(getComputedStyle(child).getPropertyValue('margin-left'), '1px');
|
||||
}, 'var(--unknown, revert-layer) in shorthand observed via longhand');
|
||||
|
||||
test((x) => {
|
||||
assert_equals(getComputedStyle(child).getPropertyValue('padding-left'), '1px');
|
||||
}, 'var(--unknown, revert-layer) in longhand');
|
||||
</script>
|
|
@ -69,7 +69,7 @@
|
|||
{ property: "font-family", valuesToTest:["Arial", "Times New Roman"], default: "Times New Roman" },
|
||||
{ property: "font-size", valuesToTest:["31px"], default: "16px" },
|
||||
{ property: "font-size-adjust", valuesToTest:["22", "none"], default: "none" },
|
||||
{ property: "font-stretch", valuesToTest:["normal", "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded"], default: "normal" },
|
||||
{ property: "font-stretch", valuesToTest:["100%", "50%", "62.5%", "75%", "87.5%", "112.5%", "125%", "150%", "200%"], default: "100%" },
|
||||
{ property: "font-style", valuesToTest:["normal", "italic"], default: "normal" },
|
||||
{ property: "font-weight", valuesToTest:["100", "200", "300", "400", "500", "600", "700", "800", "900"], default: "400" },
|
||||
{ property: "glyph-orientation-horizontal", valuesToTest:["13deg"], default: "0deg" },
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<link rel="author" title="Lea Verou" href="mailto:lea@verou.me">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-variables-1/#variables-in-shorthands">
|
||||
<link rel="match" href="reference/vars-background-shorthand-001-ref.html">
|
||||
<meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-17900">
|
||||
<style>
|
||||
div {
|
||||
width: 50px;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue