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

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: Added some changes in patch set 2 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
« no previous file with comments | « no previous file | LayoutTests/fast/forms/input-set-selectionStart-set-selectionEnd-expected.txt » ('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 <html>
3 <head>
4 <script type="text/javascript">
5 function log(msg)
tkent 2014/05/07 00:54:39 Please remove this and use debug() in ../../resour
yosin_UTC9 2014/05/07 01:06:22 I recommend to use "resources/js-test.js". It prov
harpreet.sk 2014/05/07 11:57:54 Done.
harpreet.sk 2014/05/07 11:57:54 Done.
6 {
7 document.getElementById('res').innerHTML = document.getElementById('res').in nerHTML + msg + "<br>";
8 }
9
10 function testSelection()
11 {
12 if (window.testRunner) {
tkent 2014/05/07 00:54:39 We prefer early return. if (window.testRunner
harpreet.sk 2014/05/07 11:57:54 Done.
13 testRunner.dumpAsText();
14 var firstInput = document.getElementById('val1');
tkent 2014/05/07 00:54:39 Wrong indentation.
harpreet.sk 2014/05/07 11:57:54 Corrected.
15 var secondInput = document.getElementById('val2');
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 log('First Input - Slection start: ' + firstInput.selectionStart + ' and end: ' + firstInput.selectionEnd);
23 log('Second Input - Slection start: ' + secondInput.selectionStart + ' and end: ' + secondInput.selectionEnd);
24 }
25 }
26 </script>
27 </head>
28 <body onload="testSelection()">
29 <input id="val1" type="text" />
30 <input id="val2" type="text" />
31 <div id="res"></div>
32 </body>
33 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/forms/input-set-selectionStart-set-selectionEnd-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698