JS Test Harness: Insert the stylesheet dynamically
[WebKit-https.git] / LayoutTests / fast / dom / HTMLElement / attr-missing-ancestor-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="div" contentEditable="false">
11   <div>
12     <div>
13       <p id="p"></p>
14     </div>
15   </div>
16 </div>
17 <script>
18 description('When contentEditable is missing, it maps to "inherit" state and the element is NOT editable if its nearest ancestor is NOT.')
19
20 shouldBe('document.getElementById("p").hasAttribute("contentEditable")', 'false');
21 shouldBe('document.getElementById("p").contentEditable', '"inherit"');
22 shouldBe('document.getElementById("p").isContentEditable', 'false');
23 shouldBe('window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify")', '"read-only"');
24
25 document.getElementById("div").style.display= 'none';
26
27 window.successfullyParsed = true;
28 </script>
29 <script src="../../js/resources/js-test-post.js"></script>
30 </body>
31 </html>