mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
Update web-platform-tests to revision d7afcb8708eac08a614d161d5622a48172daf7e3
This commit is contained in:
parent
6f8bb4dd40
commit
edff458e23
791 changed files with 17647 additions and 10322 deletions
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api-1/#conditional-rules" />
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script>
|
||||
CSS.registerProperty({
|
||||
name: '--length',
|
||||
syntax: '<length>',
|
||||
initialValue: '0px',
|
||||
inherits: false
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#target { color: red; }
|
||||
@supports(--length: green) {
|
||||
#target { color: rgb(1, 2, 3); }
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id=target></div>
|
||||
|
||||
<script>
|
||||
|
||||
test(function() {
|
||||
let cs = getComputedStyle(target);
|
||||
assert_equals(cs.getPropertyValue('color'), 'rgb(1, 2, 3)');
|
||||
}, '@supports should ignore registered syntax');
|
||||
|
||||
test(function() {
|
||||
assert_true(CSS.supports('--length: red'));
|
||||
assert_true(CSS.supports('--length: 10px'));
|
||||
assert_true(CSS.supports('--length: anything, really'));
|
||||
}, 'CSS.supports(conditionText) should ignore registered syntax');
|
||||
|
||||
test(function() {
|
||||
assert_false(CSS.supports('--length', 'red'));
|
||||
assert_true(CSS.supports('--length', '10px'));
|
||||
}, 'CSS.supports(property, value) should parse against registered syntax');
|
||||
|
||||
</script>
|
|
@ -93,7 +93,6 @@ assert_valid("banan\\61", "banana");
|
|||
assert_valid("<custom-ident>", "banan\\61");
|
||||
assert_valid("big | bigger | BIGGER", "bigger");
|
||||
assert_valid("foo+|bar", "foo foo foo");
|
||||
assert_valid("default", "default");
|
||||
|
||||
assert_valid("banana\t", "banana");
|
||||
assert_valid("\nbanana\r\n", "banana");
|
||||
|
@ -137,17 +136,30 @@ assert_invalid("||", "banana");
|
|||
assert_invalid("initial", "initial");
|
||||
assert_invalid("inherit", "inherit");
|
||||
assert_invalid("unset", "unset");
|
||||
assert_invalid("revert", "revert");
|
||||
assert_invalid("default", "default");
|
||||
assert_invalid("<length>|initial", "10px");
|
||||
assert_invalid("<length>|INHERIT", "10px");
|
||||
assert_invalid("<percentage>|unsEt", "2%");
|
||||
assert_invalid("<color>|REVert", "red");
|
||||
assert_invalid("<integer>|deFAUlt", "1");
|
||||
|
||||
// Invalid initialValue
|
||||
assert_invalid("*", "initial");
|
||||
assert_invalid("*", "inherit");
|
||||
assert_invalid("*", "unset");
|
||||
assert_invalid("*", "revert");
|
||||
assert_invalid("*", "default");
|
||||
assert_invalid("<custom-ident>", "initial");
|
||||
assert_invalid("<custom-ident>", "inherit");
|
||||
assert_invalid("<custom-ident>", "unset");
|
||||
assert_invalid("<custom-ident>", "revert");
|
||||
assert_invalid("<custom-ident>", "default");
|
||||
assert_invalid("<custom-ident>+", "foo initial bar");
|
||||
assert_invalid("<custom-ident>+", "foo inherit bar");
|
||||
assert_invalid("<custom-ident>+", "foo unset bar");
|
||||
assert_invalid("<custom-ident>+", "foo revert bar");
|
||||
assert_invalid("<custom-ident>+", "foo default bar");
|
||||
|
||||
assert_invalid("*", ")");
|
||||
assert_invalid("*", "([)]");
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- TODO(andruud): Add Typed OM details to spec and link to it here. -->
|
||||
<link rel="help" href="https://github.com/w3c/css-houdini-drafts/pull/783" />
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api-1/#css-style-value-reification" />
|
||||
<meta name="assert" content="Verifies that registered custom properties interact correctly with CSS Typed OM" />
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
Loading…
Add table
Add a link
Reference in a new issue