blob: a7813b3d465ae6930d92c92c4b7ff097d53e4b58 [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.querySelector('span'), null).webkitUserModify", "read-only");
shouldBeEqualToString("getComputedStyle(shadowRoot.querySelector('content').getDistributedNodes()[0], null).webkitUserModify", "read-write");
successfullyParsed = true;
</script>