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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-selection-preservation.html

Issue 1524663002: Move textarea-related tests to fast/forms/textarea/, part 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../../resources/js-test.js"></script>
4 </head> 4 </head>
5 <body> 5 <body>
6 <p>This tests for problems where we'd lose the selection in a textarea when maki ng style and value changes.</p> 6 <p>This tests for problems where we'd lose the selection in a textarea when maki ng style and value changes.</p>
7 <div id="console"></div> 7 <div id="console"></div>
8 <form id="form"><textarea id="ta">abc123 8 <form id="form"><textarea id="ta">abc123
9 </textarea></form> 9 </textarea></form>
10 <script type="text/javascript"> 10 <script type="text/javascript">
11 var ta = document.getElementById('ta'); 11 var ta = document.getElementById('ta');
12 debug("- default value"); 12 debug("- default value");
13 shouldBe('ta.selectionStart', '0'); 13 shouldBe('ta.selectionStart', '0');
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 shouldBe('ta.selectionEnd', '12'); 66 shouldBe('ta.selectionEnd', '12');
67 67
68 debug("- append a empty text node"); 68 debug("- append a empty text node");
69 ta.setSelectionRange(2, 3); 69 ta.setSelectionRange(2, 3);
70 ta.appendChild(document.createTextNode('')); 70 ta.appendChild(document.createTextNode(''));
71 shouldBe('ta.selectionStart', '12'); 71 shouldBe('ta.selectionStart', '12');
72 shouldBe('ta.selectionEnd', '12'); 72 shouldBe('ta.selectionEnd', '12');
73 </script> 73 </script>
74 </body> 74 </body>
75 </html> 75 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698