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