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

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: Addressing the expected behavior and changes asked for LayoutTests Created 6 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
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("<b>Test for BUG=367736: Blink does not respect input.selectionStart and input.selectionEnd for some cases.</b>");
tkent 2014/05/19 00:00:34 <b> tags are unnecessary. Also, double-quotes are
harpreet.sk 2014/05/19 11:16:52 Done.
11 var firstInput = document.getElementById('val1');
12 var secondInput = document.getElementById('val2');
13 if (!window.testRunner) {
14 debug('This test needs window.testRunner to work.');
15 } else {
16 firstInput.selectionStart = 3;
17 firstInput.selectionEnd = 5;
18 firstInput.value = "Parsed";
19 secondInput.selectionStart = 3;
20 secondInput.selectionEnd = 5;
21 secondInput.value = "P";
22 shouldBe('firstInput.selectionStart', '6');
tkent 2014/05/19 00:00:34 Why is it 6? firstInput doesn't have focus, so se
harpreet.sk 2014/05/19 11:16:52 I checked this case on the browser and it was show
23 shouldBe('firstInput.selectionEnd', '6');
24 shouldBe('secondInput.selectionStart', '1');
25 shouldBe('secondInput.selectionEnd', '1');
26 }
tkent 2014/05/19 00:00:34 We should have another scenario that secondInput.v
harpreet.sk 2014/05/19 11:16:52 Done.
27 </script>
28 </body>
29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698