mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision 824f0c1df556305042b8aa8073c32e9ef86c3efa
This commit is contained in:
parent
bcafe4188f
commit
d0eccdba1a
131 changed files with 3087 additions and 705 deletions
|
@ -0,0 +1,21 @@
|
|||
<!doctype html>
|
||||
<title>CSS Test: Invalidation of :host selectors</title>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="author" title="Mozilla" href="https://mozilla.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#host-selector">
|
||||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1499603">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="host" style="color: green"></div>
|
||||
<script>
|
||||
host.attachShadow({ mode: "open" }).innerHTML = `
|
||||
<style>
|
||||
:host { color: red !important }
|
||||
</style>
|
||||
`;
|
||||
test(function() {
|
||||
assert_equals(getComputedStyle(host).color, "rgb(255, 0, 0)");
|
||||
host.shadowRoot.querySelector("style").remove();
|
||||
assert_equals(getComputedStyle(host).color, "rgb(0, 128, 0)");
|
||||
}, ":host rules are properly invalidated when stylesheets are removed");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue