blob: 6b1018cee41cebc1ed7427fc228fe4db32973121 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<p>This test checks that contenteditable is propagated to distributed nodes.</p>
<div id="host" contenteditable><span></span></div>
<pre id="console"></pre>
<script>
if (window.testRunner)
testRunner.dumpAsText();
// An important part is that the span created below triggers a check for
// re-using inherited props from the cache for the distributed span.
var shadowRoot = host.createShadowRoot();
var span = document.createElement("span");
var content = document.createElement("content");
shadowRoot.appendChild(span);
shadowRoot.appendChild(content);
shouldBeEqualToString("getComputedStyle(shadowRoot.getElementsByTagName('span')[0], null).webkitUserModify", "read-only");
shouldBeEqualToString("getComputedStyle(shadowRoot.getElementsByTagName('content')[0].getDistributedNodes()[0], null).webkitUserModify", "read-write");
successfullyParsed = true;
</script>