OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style> | 4 <style> |
5 .editing { | 5 .editing { |
6 border: 2px solid red; | 6 border: 2px solid red; |
7 padding: 12px; | 7 padding: 12px; |
8 font-size: 24px; | 8 font-size: 24px; |
9 } | 9 } |
10 </style> | 10 </style> |
11 <script src="../editing.js" language="JavaScript" type="text/JavaScript" ></scri
pt> | 11 <script src="../editing.js" language="JavaScript" type="text/JavaScript" ></scri
pt> |
12 <script src="../../fast/js/resources/js-test-pre.js"></script> | 12 <script src="../../fast/js/resources/js-test-pre.js"></script> |
13 </head> | 13 </head> |
14 <body> | 14 <body> |
15 <pre id="description"></pre> | 15 <pre id="description"></pre> |
16 <pre id="console"></pre> | 16 <pre id="console"></pre> |
17 <div id="container"> | 17 <div id="container"> |
18 </div> | 18 </div> |
19 | 19 |
20 <script> | 20 <script> |
21 if (window.testRunner) | |
22 testRunner.dumpAsText(); | |
23 | |
24 function createEditableElement(id, parent) { | 21 function createEditableElement(id, parent) { |
25 var e = document.createElement('div'); | 22 var e = document.createElement('div'); |
26 e.setAttribute("contentEditable", "true"); | 23 e.setAttribute("contentEditable", "true"); |
27 e.className = 'editing'; | 24 e.className = 'editing'; |
28 e.id = id; | 25 e.id = id; |
29 | 26 |
30 parent.appendChild(e); | 27 parent.appendChild(e); |
31 return e; | 28 return e; |
32 } | 29 } |
33 | 30 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 shouldBe('internals.markerCountForNode(e.firstChild, "grammar")', '1'); | 71 shouldBe('internals.markerCountForNode(e.firstChild, "grammar")', '1'); |
75 range = internals.markerRangeForNode(e.firstChild, "grammar", 0); | 72 range = internals.markerRangeForNode(e.firstChild, "grammar", 0); |
76 shouldBe('range.toString()', '"orange,zz,apple."'); | 73 shouldBe('range.toString()', '"orange,zz,apple."'); |
77 } | 74 } |
78 | 75 |
79 var successfullyParsed = true; | 76 var successfullyParsed = true; |
80 </script> | 77 </script> |
81 <script src="../../fast/js/resources/js-test-post.js"></script> | 78 <script src="../../fast/js/resources/js-test-post.js"></script> |
82 </body> | 79 </body> |
83 </html> | 80 </html> |
OLD | NEW |