chromium/third_party/blink/web_tests/fast/dom/HTMLElement/set-invalid-value.html

<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.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.')

shouldThrow("document.getElementById('div').contentEditable = 'abc'", '"SyntaxError: Failed to set the \'contentEditable\' property on \'HTMLElement\': The value provided (\'abc\') is not one of \'true\', \'false\', \'plaintext-only\', or \'inherit\'."');
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 = ''", '"SyntaxError: Failed to set the \'contentEditable\' property on \'HTMLElement\': The value provided (\'\') is not one of \'true\', \'false\', \'plaintext-only\', or \'inherit\'."');
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>
</body>
</html>