| OLD | NEW |
| 1 <html> | 1 <!doctype html> |
| 2 <head> | 2 <script src="../../resources/testharness.js"></script> |
| 3 | 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <style> | 4 <script src="../assert_selection.js"></script> |
| 5 .editing { | 5 <div id="log"></div> |
| 6 border: 2px solid red; | |
| 7 padding: 12px; | |
| 8 font-size: 24px; | |
| 9 } | |
| 10 .explanation { | |
| 11 border: 2px solid blue; | |
| 12 padding: 12px; | |
| 13 font-size: 24px; | |
| 14 margin-bottom: 24px; | |
| 15 } | |
| 16 </style> | |
| 17 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script
> | |
| 18 | |
| 19 <script> | 6 <script> |
| 20 | 7 test(() => assert_selection( |
| 21 function editingTest() { | 8 [ |
| 22 for (i = 0; i < 4; i++) | 9 '<div contenteditable>', |
| 23 moveSelectionForwardByCharacterCommand(); | 10 '<div>foo |bar</div>', |
| 24 insertParagraphCommand(); | 11 '</div>', |
| 25 } | 12 ].join(''), |
| 26 | 13 'insertParagraph', |
| 14 [ |
| 15 '<div contenteditable>', |
| 16 '<div>foo\u{00A0}</div><div>|bar</div>', |
| 17 '</div>', |
| 18 ].join('')), |
| 19 'Keep a space after insert paragraph'); |
| 27 </script> | 20 </script> |
| 28 | |
| 29 <title>Editing Test</title> | |
| 30 </head> | |
| 31 <body> | |
| 32 <div class="explanation"> | |
| 33 Should see "foo" and "bar" each in a separate red box. Note that the "foo" text
is really "foo ". | |
| 34 There <b>must</b> be a space at the end of the line. | |
| 35 </div> | |
| 36 | |
| 37 <div contenteditable="true" id="root" style="word-wrap: break-word; -khtml-nbsp-
mode: space; -khtml-line-break: after-white-space;"> | |
| 38 <div id="test" class="editing" spellcheck="false">foo bar</div> | |
| 39 </div> | |
| 40 | |
| 41 <script> | |
| 42 runEditingTest(); | |
| 43 </script> | |
| 44 | |
| 45 </body> | |
| 46 </html> | |
| OLD | NEW |