mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Move shadow stuff to its own test in link-rel-attribute.html
This commit is contained in:
parent
f9fb610c1b
commit
cd2b3017c3
3 changed files with 10 additions and 7 deletions
|
@ -16,11 +16,6 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
var host = document.querySelector("#host");
|
||||
var shadow = host.attachShadow({ mode: "open" });
|
||||
var tmpl = document.querySelector("template#shadow-dom");
|
||||
var clone = document.importNode(tmpl.content, true);
|
||||
shadow.appendChild(clone);
|
||||
|
||||
function testLinkRelModification(testDiv, testLink) {
|
||||
assert_equals(getComputedStyle(testDiv).color, "rgb(0, 128, 0)");
|
||||
|
@ -38,6 +33,11 @@ test (() => {
|
|||
}, "Removing stylesheet from link rel attribute should remove the stylesheet for light DOM");
|
||||
|
||||
test (() => {
|
||||
var host = document.querySelector("#host");
|
||||
var shadow = host.attachShadow({ mode: "open" });
|
||||
var tmpl = document.querySelector("template#shadow-dom");
|
||||
var clone = document.importNode(tmpl.content, true);
|
||||
shadow.appendChild(clone);
|
||||
testLinkRelModification(shadow.querySelector("#shadow-div"),
|
||||
shadow.querySelector("#shadow-link"));
|
||||
}, "Removing stylesheet from link rel attribute should remove the stylesheet for shadow DOM");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue