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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/assert_selection.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/assert_selection.html
diff --git a/third_party/WebKit/LayoutTests/editing/assert_selection.html b/third_party/WebKit/LayoutTests/editing/assert_selection.html
index 1dc66d6671c331a3cc3e3d412a81ba4982d566e2..9f470c7079bf2d22560144abfadf51d6be77cb04 100644
--- a/third_party/WebKit/LayoutTests/editing/assert_selection.html
+++ b/third_party/WebKit/LayoutTests/editing/assert_selection.html
@@ -104,4 +104,14 @@ test(() => {
assert_equals(checked_assert_selection('|foo', 'noop', 'b^|az'),
'You should have focus marker and should not have anchor marker if and only if selection is a caret in "b^|az".');
}, 'anchor == foucs in output');
+
+// TODO: It's better to have more powerful diff like
+// |CreateUnifiedDiff()| in gtest or "Longest common substring"
+test(() => {
+ assert_equals(checked_assert_selection('foo', 'noop', 'foz'),
+ `LayoutTests/editing/assert_selection.html:8:9)\n` +
+ `\t expected foz,\n` +
+ `\t but got foo,\n` +
+ `\t sameupto fo`);
+}, 'Compare result');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/assert_selection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698