blob: 76eb84aac91e93cdec962e6a95d0f2102e8fac09 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<template>
<style>:host([green]) { color: green }</style>
<slot></slot>
</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].attachShadow({mode: 'open'}).appendChild(document.importNode(template.content, true));
shouldBe("getComputedStyle(roots[1]).color", "'rgb(0, 128, 0)'");
</script>