mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Update web-platform-tests to revision cbd8c8ca929bc1aea71087be3b826cf1ee189a52
This commit is contained in:
parent
0c20fba2ab
commit
9c6bf785bd
150 changed files with 1798 additions and 876 deletions
|
@ -5,31 +5,10 @@
|
|||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#slotted-pseudo">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
<style id="styleElm">
|
||||
</style>
|
||||
<script>
|
||||
function parse_selector(selector_text) {
|
||||
try {
|
||||
styleElm.sheet.insertRule(selector_text+"{}");
|
||||
styleElm.sheet.deleteRule(0);
|
||||
return true;
|
||||
} catch (ex) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function test_valid_selector(selector_text) {
|
||||
test(function(){
|
||||
assert_true(parse_selector(selector_text));
|
||||
}, "Should be a valid selector: '" + selector_text + "'");
|
||||
}
|
||||
|
||||
function test_invalid_selector(selector_text) {
|
||||
test(function(){
|
||||
assert_false(parse_selector(selector_text));
|
||||
}, "Should be an invalid selector: '" + selector_text + "'");
|
||||
}
|
||||
|
||||
test_invalid_selector("::slotted");
|
||||
test_invalid_selector("::slotted()");
|
||||
test_invalid_selector("::slotted(*).class");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue