blob: f42411acc8932eaa8175f7aedcb8e4afbf315402 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<template>
<style>:host([green]) { color: green }</style>
<content></content>
</template>
<div>
<div></div>
<div green>This text should be green</div>
</div>
<script>
description("Don't share style between two hosts with different attribute matching for :host([])");
var template = document.querySelector("template");
var roots = document.querySelectorAll("div > div");
for (var i = 0; i < roots.length; i++)
roots[i].createShadowRoot().appendChild(document.importNode(template.content, true));
shouldBe("getComputedStyle(roots[1]).color", "'rgb(0, 128, 0)'");
</script>
|