blob: 3f41ff79fe11a09b53f0b3fc6b65da730cf0980f [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../../js/resources/js-test-style.css">
<script src="../../js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></p>
<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.')
shouldThrow("document.getElementById('div').contentEditable = 'abc'", '"Error: SYNTAX_ERR: DOM Exception 12"');
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"');
shouldThrow("document.getElementById('div').contentEditable = ''", '"Error: SYNTAX_ERR: DOM Exception 12"');
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';
window.successfullyParsed = true;
</script>
<script src="../../js/resources/js-test-post.js"></script>
</body>
</html>