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

Unified Diff: third_party/WebKit/LayoutTests/editing/execCommand/unlink_with_unfocused_selection.html

Issue 2889963003: Make EnabledRangeInRichlyEditableText return false for user-triggered command and unfocused selecti… (Closed)
Patch Set: Created 3 years, 7 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/commands/EditorCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/execCommand/unlink_with_unfocused_selection.html
diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/unlink_with_unfocused_selection.html b/third_party/WebKit/LayoutTests/editing/execCommand/unlink_with_unfocused_selection.html
new file mode 100644
index 0000000000000000000000000000000000000000..13eda51bb1069b81fa7e4ed69c8ffb309b76ebf5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/execCommand/unlink_with_unfocused_selection.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<script>
+test(() => {
+ assert_exists(window, 'testRunner', 'This test requires testRunner');
+
+ assert_selection(
+ [
+ '<div contenteditable><a href="http://www.example.com/">^text|</a></div>',
+ '<a href="http://www.example2.com/" id="other">link</a>'
+ ].join(''),
+ selection => {
+ const other = selection.document.getElementById('other');
+ other.focus();
+ testRunner.execCommand('unlink');
+ assert_equals(selection.document.activeElement, other);
+ },
+ [
+ '<div contenteditable><a href="http://www.example.com/">^text|</a></div>',
+ '<a href="http://www.example2.com/" id="other">link</a>'
+ ].join(''));
+}, 'Unlink with unfocused selection in contenteditable div');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698