| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <script src="../resources/testharness.js"></script> | 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> | 3 <script src="../resources/testharnessreport.js"></script> |
| 4 <script src="assert_selection.js"></script> | 4 <script src="assert_selection.js"></script> |
| 5 <script> | 5 <script> |
| 6 function checked_assert_selection(input, command, output) { | 6 function checked_assert_selection(input, command, output) { |
| 7 try { | 7 try { |
| 8 assert_selection(input, command, output); | 8 assert_selection(input, command, output); |
| 9 } catch (exception) { | 9 } catch (exception) { |
| 10 return exception.message; | 10 return exception.message; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 // TODO: It's better to have more powerful diff like | 108 // TODO: It's better to have more powerful diff like |
| 109 // |CreateUnifiedDiff()| in gtest or "Longest common substring" | 109 // |CreateUnifiedDiff()| in gtest or "Longest common substring" |
| 110 test(() => { | 110 test(() => { |
| 111 assert_equals(checked_assert_selection('foo', 'noop', 'foz'), | 111 assert_equals(checked_assert_selection('foo', 'noop', 'foz'), |
| 112 `LayoutTests/editing/assert_selection.html:8:9)\n` + | 112 `LayoutTests/editing/assert_selection.html:8:9)\n` + |
| 113 `\t expected foz,\n` + | 113 `\t expected foz,\n` + |
| 114 `\t but got foo,\n` + | 114 `\t but got foo,\n` + |
| 115 `\t sameupto fo`); | 115 `\t sameupto fo`); |
| 116 }, 'Compare result'); | 116 }, 'Compare result'); |
| 117 |
| 118 test(() => { |
| 119 assert_selection( |
| 120 '<div contenteditable><p>^test|</p></div>', |
| 121 'insertHTML <span style="color: green">green</span>', |
| 122 '<div contenteditable><p><span style="color: green">green|</span></p></d
iv>'); |
| 123 }, 'multiple spaces in function'); |
| 117 </script> | 124 </script> |
| OLD | NEW |