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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/text/input-delete.html

Issue 2270663002: Selection API of INPUT/TEXTAREA should not update FrameSelection without focusing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust more tests Created 4 years, 4 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
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../editing/editing.js" language="JavaScript" type="text/JavaS cript" ></script> 3 <script src="../../../editing/editing.js" language="JavaScript" type="text/JavaS cript" ></script>
4 <script> 4 <script>
5 function test() { 5 function test() {
6 if (window.testRunner) { 6 if (window.testRunner) {
7 testRunner.dumpAsText(); 7 testRunner.dumpAsText();
8 } 8 }
9 document.getElementById('tf').setSelectionRange(5, 11); 9 document.getElementById('tf').setSelectionRange(5, 11);
10 document.getElementById('tf').focus();
10 deleteCommand(); 11 deleteCommand();
11 if (document.getElementById('tf').value == "Test Failed") { 12 if (document.getElementById('tf').value == "Test Failed") {
12 document.getElementById('res').innerHTML = "Failed"; 13 document.getElementById('res').innerHTML = "Failed";
13 } else { 14 } else {
14 document.getElementById('res').innerHTML = "Passed"; 15 document.getElementById('res').innerHTML = "Passed";
15 } 16 }
16 } 17 }
17 </script> 18 </script>
18 </head> 19 </head>
19 <body onload="test()"> 20 <body onload="test()">
20 <p>This tests that calling setSelectionRange on a text field will correctly clos e the typing command. If the test fails, the deleteCommand that 21 <p>This tests that calling setSelectionRange on a text field will correctly clos e the typing command. If the test fails, the deleteCommand that
21 happens after the setSelectionRange will fail, and the text field will say "Test Failed".</p> 22 happens after the setSelectionRange will fail, and the text field will say "Test Failed".</p>
22 <input id="tf" value="Test Failed"></input> 23 <input id="tf" value="Test Failed"></input>
23 <div id="res"></div> 24 <div id="res"></div>
24 </body> 25 </body>
25 </html> 26 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698