Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: third_party/WebKit/LayoutTests/editing/assert_selection.html

Issue 2138653002: [Editing][CodeHealth] Improve result comparing in assert_selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 test(() => { 98 test(() => {
99 assert_equals(checked_assert_selection('^|foo', 'noop', 'baz'), 99 assert_equals(checked_assert_selection('^|foo', 'noop', 'baz'),
100 'You should have focus marker and should not have anchor marker if and o nly if selection is a caret in "^|foo".'); 100 'You should have focus marker and should not have anchor marker if and o nly if selection is a caret in "^|foo".');
101 }, 'anchor == foucs in input'); 101 }, 'anchor == foucs in input');
102 102
103 test(() => { 103 test(() => {
104 assert_equals(checked_assert_selection('|foo', 'noop', 'b^|az'), 104 assert_equals(checked_assert_selection('|foo', 'noop', 'b^|az'),
105 'You should have focus marker and should not have anchor marker if and o nly if selection is a caret in "b^|az".'); 105 'You should have focus marker and should not have anchor marker if and o nly if selection is a caret in "b^|az".');
106 }, 'anchor == foucs in output'); 106 }, 'anchor == foucs in output');
107
108 test(() => {
109 assert_equals(checked_assert_selection('foo', 'noop', 'foz'),
110 `LayoutTests/editing/assert_selection.html:8:9)\n` +
111 `\t expected foz,\n` +
112 `\t but got foo,\n` +
113 `\t sameupto fo`);
114 }, 'Compare result');
107 </script> 115 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698