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 font-size: 24px; | |
7 width: 600px; | |
8 } | |
9 </style> | |
10 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script > | |
11 | |
12 <script> | 5 <script> |
13 | 6 test(() => assert_selection( |
14 function editingTest() { | 7 '<div contenteditable style="font-size: 24px; width: 600px;">There is a tide^< br>in the affairs of men|<br>Which taken at the flood</div>', |
15 moveSelectionForwardByLineCommand(); | 8 selection => { |
yosin_UTC9
2016/11/24 02:19:28
nit: Just use 'delete'
| |
16 extendSelectionForwardByLineCommand(); | 9 selection.document.execCommand('delete'); |
17 deleteCommand(); | 10 }, |
18 } | 11 '<div contenteditable style="font-size: 24px; width: 600px;">There is a tide|< br>Which taken at the flood</div>'), |
19 | 12 'Editing test'); |
20 </script> | 13 </script> |
21 | |
22 <title>Editing Test</title> | |
23 </head> | |
24 <body contenteditable id="root"> | |
25 <div id="test" class="editing">There is a tide<br>in the affairs of men<br>Which taken at the flood</div> | |
26 <script> | |
27 runEditingTest(); | |
28 </script> | |
29 | |
30 </body> | |
31 </html> | |
OLD | NEW |