mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests to revision 919ca26d28f02c636d4fa3d4e910a6038f02d993
This commit is contained in:
parent
f7d3d4a447
commit
136aa4015b
154 changed files with 1878 additions and 608 deletions
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api-1/#the-registerproperty-function" />
|
||||
<meta name="assert" content="Verifies that registering a propety does not affect the cascade" />
|
||||
<meta name="assert" content="Verifies that registering a property does not affect the cascade" />
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api-1" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-cascade/#default" />
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
#parent {
|
||||
--inherited: 10px;
|
||||
--non-inherited: 10px;
|
||||
}
|
||||
#child {
|
||||
--inherited: 20px;
|
||||
--non-inherited: 20px;
|
||||
--inherited: revert;
|
||||
--non-inherited: revert;
|
||||
}
|
||||
</style>
|
||||
<div id=parent>
|
||||
<div id=child>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
CSS.registerProperty({
|
||||
name: "--inherited",
|
||||
syntax: "<length>",
|
||||
initialValue: "0px",
|
||||
inherits: true
|
||||
});
|
||||
|
||||
CSS.registerProperty({
|
||||
name: "--non-inherited",
|
||||
syntax: "<length>",
|
||||
initialValue: "0px",
|
||||
inherits: false
|
||||
});
|
||||
|
||||
test(function(){
|
||||
let cs = getComputedStyle(child);
|
||||
assert_equals(cs.getPropertyValue('--inherited'), '10px');
|
||||
}, 'Inherited registered custom property can be reverted');
|
||||
|
||||
test(function(){
|
||||
let cs = getComputedStyle(child);
|
||||
assert_equals(cs.getPropertyValue('--non-inherited'), '0px');
|
||||
}, 'Non-inherited registered custom property can be reverted');
|
||||
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue