| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <p id="description"></p> |
| <div id="console"></div> |
| <div id="result"></div> |
| <div id="div" contentEditable="false"></div> |
| <div id="div2"></div> |
| <p id="p" contentEditable="true"></p> |
| <p id="p2"></p> |
| <script> |
| description('isContentEditable should not change if its contentEditable is set, no matter whether document.designMode is enabled or not.') |
| |
| document.getElementById("div2").contentEditable = false; |
| document.getElementById("p2").contentEditable = true; |
| |
| evalAndLog('document.designMode = "on"'); |
| |
| shouldBe('document.getElementById("div").getAttribute("contentEditable")','"false"'); |
| shouldBe('document.getElementById("div").contentEditable', '"false"'); |
| shouldBe('document.getElementById("div").isContentEditable', 'false'); |
| shouldBe('window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify")', '"read-only"'); |
| |
| shouldBe('document.getElementById("div2").getAttribute("contentEditable")','"false"'); |
| shouldBe('document.getElementById("div2").contentEditable', '"false"'); |
| shouldBe('document.getElementById("div2").isContentEditable', 'false'); |
| shouldBe('window.getComputedStyle(div2, "").getPropertyValue("-webkit-user-modify")', '"read-only"'); |
| |
| shouldBe('document.getElementById("p").getAttribute("contentEditable")','"true"'); |
| shouldBe('document.getElementById("p").contentEditable', '"true"'); |
| shouldBe('document.getElementById("p").isContentEditable', 'true'); |
| shouldBe('window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify")', '"read-write"'); |
| |
| shouldBe('document.getElementById("p2").getAttribute("contentEditable")','"true"'); |
| shouldBe('document.getElementById("p2").contentEditable', '"true"'); |
| shouldBe('document.getElementById("p2").isContentEditable', 'true'); |
| shouldBe('window.getComputedStyle(p2, "").getPropertyValue("-webkit-user-modify")', '"read-write"'); |
| |
| document.getElementById("div").style.display= 'none'; |
| document.getElementById("div2").style.display= 'none'; |
| document.getElementById("p").style.display= 'none'; |
| document.getElementById("p2").style.display= 'none'; |
| </script> |
| <script src="../../../resources/js-test-post.js"></script> |
| </body> |
| </html> |