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 { | |
6 border: 2px solid red; | |
7 padding: 12px; | |
8 font-size: 24px; | |
9 } | |
10 </style> | |
11 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script
> | |
12 | |
13 <script> | 5 <script> |
14 | 6 test(() => assert_selection( |
15 function editingTest() { | 7 [ |
16 typeCharacterCommand(); | 8 '<div contenteditable>', |
17 moveSelectionBackwardByCharacterCommand(); | 9 '<div>|x</div>', |
18 insertParagraphCommand(); | 10 '</div>', |
19 } | 11 ].join(''), |
20 | 12 'insertParagraph', |
| 13 [ |
| 14 '<div contenteditable>', |
| 15 '<div><br></div>', |
| 16 '<div>|x</div>', |
| 17 '</div>', |
| 18 ].join('')), |
| 19 'insert BR before a character'); |
21 </script> | 20 </script> |
22 | |
23 <title>Editing Test</title> | |
24 </head> | |
25 <body contenteditable id="root" class="editing"> | |
26 <div id="test"><br class="webkit-block-placeholder"></div> | |
27 | |
28 <!-- Test fix for <rdar://problem/3918351> REGRESSION (Mail, 173-175+): Return | |
29 before first char of line leaves insertion point in wrong place --> | |
30 | |
31 <script> | |
32 runEditingTest(); | |
33 </script> | |
34 | |
35 </body> | |
36 </html> | |
OLD | NEW |