blob: 7b9f3d846c1e43aacc2ef936425689d6b9b66b5e [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="div" contenteditable="true"></div>
<script>
description('When contentEditable is set to invalid string, SYNTAX_ERR exception (code: 12) must be raised.')
shouldThrowErrorName("document.getElementById('div').contentEditable = 'abc'", 'SyntaxError');
shouldBe('document.getElementById("div").getAttribute("contentEditable")','"true"');
shouldBe('document.getElementById("div").contentEditable', '"true"');
shouldBe('document.getElementById("div").isContentEditable', 'true');
shouldBe('window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify")', '"read-write"');
shouldThrowErrorName("document.getElementById('div').contentEditable = ''", 'SyntaxError');
shouldBe('document.getElementById("div").getAttribute("contentEditable")','"true"');
shouldBe('document.getElementById("div").contentEditable', '"true"');
shouldBe('document.getElementById("div").isContentEditable', 'true');
shouldBe('window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify")', '"read-write"');
document.getElementById("div").style.display= 'none';
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>