JS Test Harness: Insert the stylesheet dynamically
[WebKit-https.git] / LayoutTests / fast / dom / HTMLElement / set-false.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <div id="console"></p>
9 <div id="result"></div>
10 <div id="div1" contenteditable="true"></div>
11 <div id="div2" contenteditable="true">
12     <p id="p2"></p>
13 </div>
14 <script>
15 description('When contentEditable is set to "false" string from "true" or inherit, element.contentEditable returns "false" and the element is NOT editable.')
16
17 document.getElementById("div1").contentEditable = "false";
18 document.getElementById("p2").contentEditable = "false";
19
20 shouldBe('document.getElementById("div1").getAttribute("contentEditable")','"false"');
21 shouldBe('document.getElementById("div1").contentEditable', '"false"');
22 shouldBe('document.getElementById("div1").isContentEditable', 'false');
23 shouldBe('window.getComputedStyle(div1, "").getPropertyValue("-webkit-user-modify")', '"read-only"');
24
25 shouldBe('document.getElementById("p2").contentEditable', '"false"');
26 shouldBe('document.getElementById("p2").isContentEditable', 'false');
27 shouldBe('window.getComputedStyle(p2, "").getPropertyValue("-webkit-user-modify")', '"read-only"');
28
29 document.getElementById("div1").style.display= 'none';
30 document.getElementById("div2").style.display= 'none';
31
32 window.successfullyParsed = true;
33 </script>
34 <script src="../../js/resources/js-test-post.js"></script>
35 </body>
36 </html>