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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/execCommand/transpose_with_unfocused_selection.html

Issue 2887213003: Make EnableCaretInEditableText return false for user-triggered command and unfocused selection (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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!doctype html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../assert_selection.js"></script>
5 <script>
6 test(() => {
7 assert_exists(window, 'testRunner', 'This test requires testRunner');
8
9 assert_selection(
10 [
11 '<textarea>t|ext</textarea>',
12 '<a href="http://www.example.com/">link</a>'
13 ].join(''),
14 selection => {
15 const link = selection.document.querySelector('a');
16 link.focus();
17 testRunner.execCommand('transpose');
18 assert_equals(selection.document.activeElement, link);
19 },
20 [
21 '|<textarea>text</textarea>',
22 '<a href="http://www.example.com/">link</a>'
23 ].join(''));
24 }, 'Transpose with unfocused selection in text control');
25
26 test(() => {
27 assert_exists(window, 'testRunner', 'This test requires testRunner');
28
29 assert_selection(
30 [
31 '<div contenteditable>t|ext</div>',
32 '<a href="http://www.example.com/">link</a>'
33 ].join(''),
34 selection => {
35 const link = selection.document.querySelector('a');
36 link.focus();
37 testRunner.execCommand('transpose');
38 assert_equals(selection.document.activeElement, link);
39 },
40 [
41 '<div contenteditable>t|ext</div>',
42 '<a href="http://www.example.com/">link</a>'
43 ].join(''));
44 }, 'Transpose with unfocused selection in contenteditable div');
45 </script>
OLDNEW
« 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