OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> |
| 3 <p>This test checks that contenteditable is propagated to distributed nodes.</p> |
| 4 <div id="host" contenteditable><span></span></div> |
| 5 <pre id="console"></pre> |
| 6 <script> |
| 7 if (window.testRunner) |
| 8 testRunner.dumpAsText(); |
| 9 |
| 10 // An important part is that the span created below triggers a check for |
| 11 // re-using inherited props from the cache for the distributed span. |
| 12 |
| 13 var shadowRoot = host.createShadowRoot(); |
| 14 var span = document.createElement("span"); |
| 15 var content = document.createElement("content"); |
| 16 shadowRoot.appendChild(span); |
| 17 shadowRoot.appendChild(content); |
| 18 |
| 19 shouldBeEqualToString("getComputedStyle(shadowRoot.getElementsByTagName('span')[
0], null).webkitUserModify", "read-only"); |
| 20 shouldBeEqualToString("getComputedStyle(shadowRoot.getElementsByTagName('content
')[0].getDistributedNodes()[0], null).webkitUserModify", "read-write"); |
| 21 |
| 22 successfullyParsed = true; |
| 23 </script> |
OLD | NEW |