blob: bd0647d76cc9d51f4fc1a0eb901990b37fd81cf9 [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="d" contentEditable="abc"></div>
<div id="d2" contentEditable="inherit"></div>
<script>
description('When contentEditable attribute is invalid string, element.contentEditable returns "inherit".')
shouldBe('document.getElementById("d").getAttribute("contentEditable")','"abc"');
shouldBe('document.getElementById("d").contentEditable', '"inherit"');
shouldBe('document.getElementById("d").isContentEditable', 'false');
shouldBe('window.getComputedStyle(d, "").getPropertyValue("-webkit-user-modify")', '"read-only"');
shouldBe('document.getElementById("d2").getAttribute("contentEditable")','"inherit"');
shouldBe('document.getElementById("d2").contentEditable', '"inherit"');
shouldBe('document.getElementById("d2").isContentEditable', 'false');
shouldBe('window.getComputedStyle(d2, "").getPropertyValue("-webkit-user-modify")', '"read-only"');
document.getElementById("d").style.display= 'none';
document.getElementById("d2").style.display= 'none';
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>