mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1740376 [wpt PR 31570] - [css-conditional] Split CSS.supports() test by spec level., a=testonly
Automatic update from web-platform-tests [css-conditional] Split CSS.supports() test by spec level. -- wpt-commits: f60db899302b235660f458972d9ef7f6f7063f7c wpt-pr: 31570
This commit is contained in:
parent
66ccb7f8f4
commit
77299f01a9
@ -1,7 +1,7 @@
|
||||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS.supports</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-conditional/#dom-css-supports">
|
||||
<title>CSS.supports() Level 3</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-conditional-3/#the-css-namespace">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
@ -40,28 +40,4 @@
|
||||
test(function() {
|
||||
assert_equals(CSS.supports("--foo", "blah"), true);
|
||||
}, "two argument form succeeds for custom property");
|
||||
|
||||
test(function() {
|
||||
assert_equals(CSS.supports("selector(div)"), true);
|
||||
}, "selector() function accepts a selector");
|
||||
|
||||
test(function() {
|
||||
assert_equals(CSS.supports("selector(div, div)"), false);
|
||||
}, "selector() function doesn't accept a selector list");
|
||||
|
||||
test(function() {
|
||||
assert_equals(CSS.supports("selector(::-webkit-unknown-pseudo-element)"), false);
|
||||
}, "selector() function rejects unknown webkit pseudo-elements.");
|
||||
|
||||
test(function() {
|
||||
assert_equals(CSS.supports("selector(::before)"), true);
|
||||
}, "selector() function accepts known pseudo-elements");
|
||||
|
||||
test(function() {
|
||||
assert_equals(CSS.supports("selector(div + .c)"), true);
|
||||
}, "selector() with simple combinators");
|
||||
|
||||
test(function() {
|
||||
assert_equals(CSS.supports("selector(div | .c)"), false);
|
||||
}, "selector() with unknown combinators");
|
||||
</script>
|
@ -0,0 +1,31 @@
|
||||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS.supports() Level 4</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-conditional-4/#the-css-namespace">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(CSS.supports("selector(div)"), true);
|
||||
}, "selector() function accepts a selector");
|
||||
|
||||
test(function() {
|
||||
assert_equals(CSS.supports("selector(div, div)"), false);
|
||||
}, "selector() function doesn't accept a selector list");
|
||||
|
||||
test(function() {
|
||||
assert_equals(CSS.supports("selector(::-webkit-unknown-pseudo-element)"), false);
|
||||
}, "selector() function rejects unknown webkit pseudo-elements.");
|
||||
|
||||
test(function() {
|
||||
assert_equals(CSS.supports("selector(::before)"), true);
|
||||
}, "selector() function accepts known pseudo-elements");
|
||||
|
||||
test(function() {
|
||||
assert_equals(CSS.supports("selector(div + .c)"), true);
|
||||
}, "selector() with simple combinators");
|
||||
|
||||
test(function() {
|
||||
assert_equals(CSS.supports("selector(div | .c)"), false);
|
||||
}, "selector() with unknown combinators");
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user