| <html> |
| <head> |
| <style> |
| .editing { |
| border: 2px solid red; |
| font-size: 24px; |
| } |
| .explanation { |
| border: 2px solid blue; |
| padding: 12px; |
| font-size: 24px; |
| margin-bottom: 24px; |
| } |
| .scenario { margin-bottom: 16px;} |
| .scenario:first-line { font-weight: bold; margin-bottom: 16px;} |
| .expected-results:first-line { font-weight: bold } |
| </style> |
| <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script> |
| <script src="../../resources/dump-as-markup.js"></script> |
| <title>Editing Test</title> |
| </head> |
| <body> |
| |
| <div id="expected" class="expected-results"> |
| <ul style="text-align:right;"><li>A</li></ul> |
| <div> |
| <ul> |
| <li> |
| <a href="">B</a> |
| <br> |
| C |
| </li> |
| </ul> |
| </div> |
| </div> |
| |
| <div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;"> |
| <div id="test" class="editing"> |
| <ul style="text-align:right;"><li>A</li></ul> |
| <div> |
| <ul> |
| <li> |
| <a href="">B</a> |
| <br> |
| C |
| </li> |
| </ul> |
| </div> |
| </div> |
| </div> |
| <script> |
| |
| function editingTest() { |
| for (i = 0; i < 3; i++) |
| extendSelectionForwardByLineCommand(); |
| copyCommand(); |
| pasteCommand(); |
| Markup.description('Bug fix for <a href="rdar://problem/4039777"><rdar://problem/4039777></a> Pasting particular snippet of HTML containing list items and a link creates too many list items'); |
| Markup.dump('expected', 'Expected result'); |
| Markup.dump('test', 'Actual result'); |
| } |
| |
| runDumpAsTextEditingTest(true); |
| |
| </script> |
| |
| </body> |
| </html> |