summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/HTMLElement/attr-invalid-string.html
blob: 3bb1a654f10a60a6383ebede6b08612d8135bd1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE html>
<html>
<head>
<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="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';

window.successfullyParsed = true;
</script>
<script src="../../js/resources/js-test-post.js"></script>
</body>
</html>