[:is/:where] Add WPT is-specificity-shadow.html

Our specificity calculation for :host() incorrectly uses the
maximum specificity for the selector that _matched_ inside :host().
Since no selector matches in this case, the specificity is zero, and
we end up applying the wrong thing.

Bug: 1143404
Change-Id: Ib3f4d132c36aedeade3fd79d86c960c352eba120
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2505896
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#822070}
diff --git a/css/selectors/is-specificity-shadow.html b/css/selectors/is-specificity-shadow.html
new file mode 100644
index 0000000..af03995
--- /dev/null
+++ b/css/selectors/is-specificity-shadow.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<title>Specificity of :host() inside :is()</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel="help" href="https://drafts.csswg.org/selectors-4/#matches">
+<link rel="help" href="https://drafts.csswg.org/css-scoping/#host-selector">
+<style>
+  main :not(:is(:host(#a))) { color: green; }
+  main :not(:is(:host(.a))) { color: red; }
+</style>
+<main>
+  <div id=element>Green</div>
+</main>
+<script>
+  test(function() {
+    assert_equals(getComputedStyle(element).color, 'rgb(0, 128, 0)');
+  }, 'Specificity of :host() inside :is()');
+</script>