mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
Update web-platform-tests to revision a587550f729c270ae55b56a92c94605461cc919a
This commit is contained in:
parent
07f6d783a3
commit
96fc7662dc
1201 changed files with 54725 additions and 53087 deletions
|
@ -6,18 +6,30 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
body {
|
||||
#parent {
|
||||
--var1: inherited;
|
||||
}
|
||||
#child {
|
||||
--my-width: env(test, 100px);
|
||||
width: var(--my-width);
|
||||
--var1: env(nonexistent);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="parent">
|
||||
<div id="child"></div>
|
||||
</div>
|
||||
<script>
|
||||
test(() => {
|
||||
const style = window.getComputedStyle(document.body);
|
||||
const style = window.getComputedStyle(child);
|
||||
assert_equals(style.getPropertyValue("width"), "100px");
|
||||
});
|
||||
}, 'env() is substituted into a custom property');
|
||||
|
||||
test(() => {
|
||||
const style = window.getComputedStyle(child);
|
||||
assert_equals(style.getPropertyValue("--var1"), " inherited");
|
||||
}, 'Substitution of unrecognized env() causes unset');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue