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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/arrow_key_with_unfocused_selection.html

Issue 2886933002: Make EnabledInEditableText 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 // Regression tests for crbug.com/713607.
7
8 test(() => {
9 assert_exists(window, 'eventSender', 'This test requires eventSender');
10
11 assert_selection(
12 [
13 '<textarea>^text|</textarea>',
14 '<a href="http://www.example.com/">link</a>'
15 ].join(''),
16 selection => {
17 const link = selection.document.querySelector('a');
18 link.focus();
19 eventSender.keyDown('ArrowLeft');
20 assert_equals(selection.document.activeElement, link);
21 },
22 [
23 '|<textarea>text</textarea>',
24 '<a href="http://www.example.com/">link</a>'
25 ].join(''));
26 }, 'Press left arrow key with unfocused selection in text control');
27
28 test(() => {
29 assert_exists(window, 'eventSender', 'This test requires eventSender');
30
31 assert_selection(
32 [
33 '<div contenteditable>^text|</div>',
34 '<a href="http://www.example.com/">link</a>'
35 ].join(''),
36 selection => {
37 const link = selection.document.querySelector('a');
38 link.focus();
39 eventSender.keyDown('ArrowLeft');
40 assert_equals(selection.document.activeElement, link);
41 },
42 [
43 '<div contenteditable>^text|</div>',
44 '<a href="http://www.example.com/">link</a>'
45 ].join(''));
46 }, 'Press left arrow key with unfocused selection in contenteditable div');
47 </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