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

Side by Side Diff: LayoutTests/fast/forms/input-set-selectionStart-set-selectionEnd.html

Issue 258063005: Blink does not respect input.selectionStart and input.selectionEnd for some cases (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: New patch fixing existing bug Created 6 years, 6 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <input id="val1" type="text" />
8 <input id="val2" type="text" />
9 <script type="text/javascript">
10 description('Test for BUG=367736: Blink does not respect input.selectionStart an d input.selectionEnd for some cases.');
11 var firstInput = document.getElementById('val1');
12 var secondInput = document.getElementById('val2');
13 firstInput.selectionStart = 3;
14 firstInput.selectionEnd = 5;
15 firstInput.value = 'Parsed';
16 shouldBe('firstInput.selectionStart', '3');
17 shouldBe('firstInput.selectionEnd', '5');
18 secondInput.selectionStart = 3;
19 secondInput.selectionEnd = 5;
20 secondInput.value = 'P';
21 shouldBe('secondInput.selectionStart', '1');
22 shouldBe('secondInput.selectionEnd', '1');
23 secondInput.value = 'Parsed';
24 shouldBe('secondInput.selectionStart', '1');
25 shouldBe('secondInput.selectionEnd', '1');
26 </script>
27 </body>
28 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698