Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!doctype html> | |
| 2 <script src="../../resources/testharness.js"></script> | |
| 3 <script src="../../resources/testharnessreport.js"></script> | |
| 4 <script src="../assert_selection.js"></script> | |
| 5 <script> | |
| 6 test(() => assert_selection( | |
| 7 [ | |
| 8 '<div contenteditable>', | |
| 9 '<div>', | |
| 10 '<div>This is ^some text.</div>', | |
| 11 '<div>This is| some text.</div>', | |
| 12 '</div>', | |
| 13 '</div>', | |
| 14 ].join(''), | |
| 15 'delete', | |
| 16 [ | |
| 17 '<div contenteditable>', | |
| 18 '<div>', | |
| 19 'This is |\u{00A0}some text.', | |
| 20 '</div>', | |
| 21 '</div>', | |
| 22 ].join('')), | |
| 23 'Select without surrounding whitespace'); | |
| 24 | |
| 25 test(() => assert_selection( | |
| 26 [ | |
| 27 '<div contenteditable>', | |
| 28 '<div>', | |
| 29 '<div>This is ^some text.</div>', | |
| 30 '<div>This is |some text.</div>', | |
| 31 '</div>', | |
| 32 '</div>', | |
| 33 ].join(''), | |
| 34 'delete', | |
| 35 [ | |
| 36 '<div contenteditable>', | |
| 37 '<div>', | |
| 38 'This is |some text.', | |
| 39 '</div>', | |
| 40 '</div>', | |
| 41 ].join('')), | |
| 42 'Select with trailing whitespace'); | |
| 43 | |
| 44 test(() => assert_selection( | |
| 45 [ | |
| 46 '<div contenteditable>', | |
| 47 '<div>', | |
| 48 '<div>This is^ some text.</div>', | |
| 49 '<div>This is| some text.</div>', | |
| 50 '</div>', | |
| 51 '</div>', | |
| 52 ].join(''), | |
| 53 'delete', | |
| 54 [ | |
| 55 '<div contenteditable>', | |
| 56 '<div>', | |
| 57 'This is| some text.', | |
| 58 '</div>', | |
| 59 '</div>', | |
| 60 ].join('')), | |
| 61 'Select with surrounding whitespace'); | |
|
Xiaocheng
2016/08/18 08:03:45
nit: should be with leading whitespace
| |
| 62 | |
| 63 test(() => assert_selection( | |
| 64 [ | |
| 65 '<div contenteditable>', | |
| 66 '<div>', | |
| 67 '<div>This is^ some text.</div>', | |
| 68 '<div>This is| some text.</div>', | |
| 69 '</div>', | |
| 70 '</div>', | |
| 71 ].join(''), | |
| 72 'delete', | |
| 73 [ | |
| 74 '<div contenteditable>', | |
| 75 '<div>', | |
| 76 'This is| some text.', | |
| 77 '</div>', | |
| 78 '</div>', | |
| 79 ].join('')), | |
| 80 'Select leading multiple whitespaces'); | |
| 81 | |
| 82 test(() => assert_selection( | |
| 83 [ | |
| 84 '<div contenteditable>', | |
| 85 '<div>', | |
| 86 '<div>This is^ some text.</div>', | |
| 87 '<div>This is| some text.</div>', | |
| 88 '</div>', | |
| 89 '</div>', | |
| 90 ].join(''), | |
| 91 'delete', | |
| 92 [ | |
| 93 '<div contenteditable>', | |
| 94 '<div>', | |
| 95 'This is| some text.', | |
| 96 '</div>', | |
| 97 '</div>', | |
| 98 ].join('')), | |
| 99 'Squash whitespaces around selection'); | |
| 100 | |
| 101 test(() => assert_selection( | |
| 102 [ | |
| 103 '<div contenteditable>', | |
| 104 '<div>', | |
| 105 '<div>This is ^some text.</div>', | |
| 106 '<div>This is| some text.</div>', | |
| 107 '</div>', | |
| 108 '</div>', | |
| 109 ].join(''), | |
| 110 'delete', | |
| 111 [ | |
| 112 '<div contenteditable>', | |
| 113 '<div>', | |
| 114 'This is |\u{00A0}some text.', | |
| 115 '</div>', | |
| 116 '</div>', | |
| 117 ].join('')), | |
| 118 'Squash whitespaces around selection with nbsp'); | |
| 119 </script> | |
| OLD | NEW |