| 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 body { | |
| 6 font-size: 24px; | |
| 7 } | |
| 8 .editing { | |
| 9 border: 2px solid red; | |
| 10 padding: 12px; | |
| 11 } | |
| 12 div { | |
| 13 border: 2px solid blue; | |
| 14 padding: 12px; | |
| 15 } | |
| 16 | |
| 17 </style> | |
| 18 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script
> | |
| 19 | |
| 20 <script> | 5 <script> |
| 21 | 6 test(() => assert_selection( |
| 22 function editingTest() { | 7 [ |
| 23 for (i = 0; i < 4; i++) | 8 '<div contenteditable>', |
| 24 moveSelectionForwardByCharacterCommand(); | 9 '<p>foo</p>', |
| 25 insertParagraphCommand(); | 10 '|<br>', |
| 26 } | 11 '<p>bar</p>', |
| 27 | 12 '</div>', |
| 13 ].join(''), |
| 14 'insertParagraph', |
| 15 [ |
| 16 '<div contenteditable>', |
| 17 '<p>foo</p>', |
| 18 '<div><br></div>', |
| 19 '|<br>', |
| 20 '<p>bar</p>', |
| 21 '</div>', |
| 22 ].join('')), |
| 23 'insert DIV+BR before BR'); |
| 28 </script> | 24 </script> |
| 29 | |
| 30 <title>Editing Test</title> | |
| 31 </head> | |
| 32 <body contenteditable id="root"> | |
| 33 | |
| 34 Test inserting paragraphs: should see an empty blue box above an empty line betw
een "foo" and "bar" | |
| 35 | |
| 36 <div style="border: none; height: 12px"></div> | |
| 37 | |
| 38 <p id="test" class="editing">foo</p><br><p class="editing">bar</p> | |
| 39 | |
| 40 <script> | |
| 41 runEditingTest(); | |
| 42 </script> | |
| 43 | |
| 44 </body> | |
| 45 </html> | |
| OLD | NEW |