OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <p id="description"></p> | 7 <p id="description"></p> |
8 <div id="console"></div> | 8 <div id="console"></div> |
9 <div id="result"></div> | 9 <div id="result"></div> |
10 <div id="div" contenteditable="true"></div> | 10 <div id="div" contenteditable="true"></div> |
11 <script> | 11 <script> |
12 description('When contentEditable is set to invalid string, SYNTAX_ERR exception
(code: 12) must be raised.') | 12 description('When contentEditable is set to invalid string, SYNTAX_ERR exception
(code: 12) must be raised.') |
13 | 13 |
14 shouldThrow("document.getElementById('div').contentEditable = 'abc'", '"SyntaxEr
ror: An invalid or illegal string was specified."'); | 14 shouldThrow("document.getElementById('div').contentEditable = 'abc'", '"SyntaxEr
ror: An invalid or illegal string was specified."'); |
15 shouldBe('document.getElementById("div").getAttribute("contentEditable")','"true
"'); | 15 shouldBe('document.getElementById("div").getAttribute("contentEditable")','"true
"'); |
16 shouldBe('document.getElementById("div").contentEditable', '"true"'); | 16 shouldBe('document.getElementById("div").contentEditable', '"true"'); |
17 shouldBe('document.getElementById("div").isContentEditable', 'true'); | 17 shouldBe('document.getElementById("div").isContentEditable', 'true'); |
18 shouldBe('window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify
")', '"read-write"'); | 18 shouldBe('window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify
")', '"read-write"'); |
19 | 19 |
20 shouldThrow("document.getElementById('div').contentEditable = ''", '"SyntaxError
: An invalid or illegal string was specified."'); | 20 shouldThrow("document.getElementById('div').contentEditable = ''", '"SyntaxError
: An invalid or illegal string was specified."'); |
21 shouldBe('document.getElementById("div").getAttribute("contentEditable")','"true
"'); | 21 shouldBe('document.getElementById("div").getAttribute("contentEditable")','"true
"'); |
22 shouldBe('document.getElementById("div").contentEditable', '"true"'); | 22 shouldBe('document.getElementById("div").contentEditable', '"true"'); |
23 shouldBe('document.getElementById("div").isContentEditable', 'true'); | 23 shouldBe('document.getElementById("div").isContentEditable', 'true'); |
24 shouldBe('window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify
")', '"read-write"'); | 24 shouldBe('window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify
")', '"read-write"'); |
25 | 25 |
26 document.getElementById("div").style.display= 'none'; | 26 document.getElementById("div").style.display= 'none'; |
27 </script> | 27 </script> |
28 </body> | 28 </body> |
29 </html> | 29 </html> |
OLD | NEW |