forked from mirrors/gecko-dev
Automatic update from web-platform-tests Make :host()/:host-context() accept a single <compound-selector> This aligns us with Firefox/spec, and makes it possible to remove the awkward dynamic specificity calculation code from SelectorChecker. Added some basic parsing WPTs since it appeared to be missing. I2S: https://groups.google.com/a/chromium.org/g/blink-dev/c/ztanzClftBA/ Fixed: 1143404 Test: wpt/css/css-scoping/host-[context]-specificity-00[n].html Change-Id: I146849d6beba971353f58ff136577a9faacf1c7d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2747498 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/master@{#862425} -- wpt-commits: a9a2c239455f884f0a3656d1fb0f615ef0e32c2b wpt-pr: 28052
16 lines
692 B
HTML
16 lines
692 B
HTML
<!DOCTYPE html>
|
|
<title>Test parsing of the host-context() pseudo-classes</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectordef-host-context">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/css/support/parsing-testcommon.js"></script>
|
|
<script>
|
|
test_valid_selector(':host-context(.a)');
|
|
test_valid_selector(':host-context(div.a)');
|
|
|
|
test_invalid_selector(':host-context');
|
|
test_invalid_selector(':host-context()');
|
|
test_invalid_selector(':host-context(.a, .b)');
|
|
test_invalid_selector(':host-context(.a + .b)');
|
|
test_invalid_selector(':host-context(.a + .b, #c > #d)');
|
|
</script>
|