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

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 changes asked for LayoutTests in patch set 3 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 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
yosin_UTC9 2014/05/09 07:12:21 nit: Please remove this extra blank line.
harpreet.sk 2014/05/14 10:24:10 Done.
11 description("<b>Test for BUG=367736: Blink does not respect input.selectionStart and input.selectionEnd for some cases.</b>");
12 var firstInput = document.getElementById('val1');
13 var secondInput = document.getElementById('val2');
14 testSelection();
yosin_UTC9 2014/05/09 07:12:21 nit: It seems we can inline |testSelection()| here
harpreet.sk 2014/05/14 10:24:10 Done.
15
16 function testSelection()
17 {
18 if (!window.testRunner) {
19 debug('This test needs window.testRunner to work.');
20 return;
21 }
22
23 firstInput.selectionStart = 3;
24 firstInput.selectionEnd = 5;
25 firstInput.value = "Parsed";
26 secondInput.selectionStart = 3;
27 secondInput.selectionEnd = 5;
28 secondInput.value = "P";
29 shouldBe('firstInput.selectionStart', '6');
30 shouldBe('firstInput.selectionEnd', '6');
31 shouldBe('secondInput.selectionStart', '1');
32 shouldBe('secondInput.selectionEnd', '1');
33 }
34
35 </script>
36 </head>
yosin_UTC9 2014/05/09 07:12:21 nit: Please remove this extra "</head>".
harpreet.sk 2014/05/14 10:24:10 Done.
37
yosin_UTC9 2014/05/09 07:12:21 nit: Please remove this extra blank line.
harpreet.sk 2014/05/14 10:24:10 Done.
38 </body>
39 </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