OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <head> |
| 3 <script src="resources/shadow-dom.js"></script> |
| 4 <script src="../../../resources/js-test.js"></script> |
| 5 </head> |
| 6 <body> |
| 7 </body> |
| 8 <script> |
| 9 description('crbug.com/337618: computedStyle should be cleared when distribution
is updated'); |
| 10 |
| 11 document.body.appendChild( |
| 12 createDOM('div', {'id': 'host'}, |
| 13 createShadowRoot( |
| 14 createDOM('div', {'class': 'foo'}, |
| 15 createDOM('content', {'id': 'content', 'select': '*'}))), |
| 16 createDOM('div', {'id': 'child'}, |
| 17 createShadowRoot( |
| 18 createDOM('style', {}, |
| 19 document.createTextNode(":host-context(.foo) div { color: g
reen; }")), |
| 20 createDOM('div', {'id': 'bar'}, |
| 21 document.createTextNode("bar")))))); |
| 22 |
| 23 shouldBe('window.getComputedStyle(getNodeInTreeOfTrees("child/bar")).color', '"r
gb(0, 128, 0)"'); |
| 24 |
| 25 var content = getNodeInTreeOfTrees('host/content'); |
| 26 content.setAttribute('select', '.foobar'); |
| 27 shouldBe('window.getComputedStyle(getNodeInTreeOfTrees("child/bar")).color', '"r
gb(0, 0, 0)"'); |
| 28 </script> |
OLD | NEW |