blob: 98a63b9aef36457346169c2b9d0a7bb059a806f4 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<div id="result"></div>
<div id="parent_of_div">
<div id="div"></div>
</div>
<div id="parent_of_p">
<p id="p"></p>
</div>
<script>
description('Content should be editable if its and its ancestor\'s contentEditable not set, and document.designMode is enabled.')
evalAndLog('document.designMode = "on"');
shouldBe('document.getElementById("div").contentEditable', '"inherit"');
shouldBe('document.getElementById("div").isContentEditable', 'true');
shouldBe('window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify")', '"read-write"');
shouldBe('document.getElementById("p").contentEditable', '"inherit"');
shouldBe('document.getElementById("p").isContentEditable', 'true');
shouldBe('window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify")', '"read-write"');
document.getElementById("parent_of_div").style.display= 'none';
document.getElementById("parent_of_p").style.display= 'none';
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>