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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/text-control-selection-after-blur.html

Issue 2882953002: Merge "INPUT/TEXTAREA elements: Fix incorrect selectionStart/selectionEnd values after blur." to M59 (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/LayoutTests/fast/forms/text/text-selection-after-type-change.html » ('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 <title>Tests for crbug.com/714425</title>
3 <body>
4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
6
7 <input>
8 <textarea></textarea>
9
10 <script>
11 function testSelectionAfterBlur(element) {
12 test(() => {
13 assert_exists(window, 'eventSender');
14 element.value = '';
15 element.focus();
16 eventSender.keyDown('a');
17 eventSender.keyDown('b');
18 eventSender.keyDown('Backspace');
19 assert_equals(element.selectionStart, 1, 'selectionStart before blur');
20 assert_equals(element.selectionEnd, 1, 'selectionEnd before blur');
21 element.blur();
22 assert_equals(element.selectionStart, 1, 'selectionStart after blur');
23 assert_equals(element.selectionEnd, 1, 'selectionEnd after blur');
24 }, `${element.tagName}: selectionStart/selectionEnd should be correct after bl ur()`);
25 }
26
27 testSelectionAfterBlur(document.querySelector('input'));
28 testSelectionAfterBlur(document.querySelector('textarea'));
29 </script>
30 </body>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/forms/text/text-selection-after-type-change.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698