| <html> |
| <head> |
| |
| <style> |
| .editing { |
| border: 2px solid red; |
| font-size: 24px; |
| } |
| .explanation { |
| border: 4px solid blue; |
| padding: 16px; |
| font-size: 18px; |
| margin-bottom: 10px; |
| } |
| .scenario:first-line { font-weight: bold; font-size: 24px; } |
| .expected:first-line { font-weight: bold; font-size: 24px; } |
| .results { margin-bottom: 10px; border: 2px solid green; font-size: 24px; } |
| </style> |
| <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script> |
| |
| <script> |
| |
| function editingTest() { |
| moveSelectionForwardByLineCommand(); |
| for (i = 0; i < 18; i++) |
| extendSelectionForwardByCharacterCommand(); |
| deleteCommand(); |
| } |
| |
| </script> |
| |
| <title>Editing Test</title> |
| </head> |
| <body> |
| |
| <div class="explanation"> |
| <div class="scenario"> |
| Tests: |
| <br> |
| Our ability to "edit around" content the HTML editing code does not yet handle very well. |
| <br><i>For this test: </i>Select and delete a table. |
| </div> |
| <br> |
| <div class="expected"> |
| Expected Results: |
| <br> |
| The content in the red box must exactly match the content in the green box (except for the border color). |
| <br><i>For this test: </i>Only table should get deleted. |
| Surrounding content that is not selected should (obviously) not be affected. |
| </div> |
| </div> |
| |
| <div class="results"> |
| beforeafter |
| </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"> |
| before<table border="1"> |
| <tr> |
| <td>1</td> |
| <td>2</td> |
| <td>3</td> |
| </tr> |
| <tr> |
| <td>4</td> |
| <td>5</td> |
| <td>6</td> |
| </tr> |
| <tr> |
| <td>7</td> |
| <td>8</td> |
| <td>9</td> |
| </tr> |
| </table> |
| after |
| </div> |
| </div> |
| |
| <script> |
| runEditingTest(); |
| </script> |
| |
| </body> |
| </html> |