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

Unified Diff: third_party/WebKit/LayoutTests/editing/caret/set-without-validation-with-upstream-caret.html

Issue 1581333002: Make VisibleSelection::setWithoutValidation() to handle TextAffinity::Upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-01-14T14:55:53 Created 4 years, 11 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/Source/core/editing/VisibleSelection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/caret/set-without-validation-with-upstream-caret.html
diff --git a/third_party/WebKit/LayoutTests/editing/caret/set-without-validation-with-upstream-caret.html b/third_party/WebKit/LayoutTests/editing/caret/set-without-validation-with-upstream-caret.html
new file mode 100644
index 0000000000000000000000000000000000000000..74a5fcb6b4cde89e5e8b8dca66505e6e5d4871a8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/caret/set-without-validation-with-upstream-caret.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<div id="sample" contentEditable></div>
+<script>
+test(function() {
+ var sample = document.getElementById('sample');
+ sample.appendChild(document.createTextNode('A text for creating line wrap '.repeat(50)));
+ var selection = window.getSelection();
+ selection.collapse(sample.firstChild, 0);
+ // Make selection as caret with TextAffinity::Upstream
+ selection.modify('move', 'forward', 'lineBoundary')
+ // Call |VisibleSelection::setWithoutValidation()| via
+ // |FrameSelection::nodeWillBeRemoved()|.
+ sample.remove();
+}, 'setWithoutValidation with upstream caret');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/VisibleSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698