Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <p>Matching other execCommand identifiers, execCommand("InsertLineBreak") should not scroll the page to make selection visible.</p> | 1 <p>Matching other execCommand identifiers, execCommand("InsertLineBreak") should not scroll the page to make selection visible.</p> |
| 2 <p>This test only works in WebKit, as other engines do not implement this comman d.</p> | 2 <p>This test only works in WebKit, as other engines do not implement this comman d.</p> |
| 3 <div contenteditable>a</div> | 3 <div contenteditable>a</div> |
| 4 <div style="height:10000"></div> | 4 <div style="height:10000"></div> |
| 5 <script> | 5 <script> |
| 6 var text = document.getElementsByTagName('div')[0].firstChild; | 6 var text = document.getElementsByTagName('div')[0].firstChild; |
| 7 window.getSelection().setBaseAndExtent(text, 0, text, 0); | 7 window.getSelection().setBaseAndExtent(text, 0, text, 0); |
| 8 window.scrollTo(0, 1000); | 8 window.scrollTo(0, 1000); |
| 9 document.execCommand("InsertLineBreak"); | 9 document.execCommand("InsertLineBreak"); |
| 10 | 10 |
| 11 var result = (window.pageYOffset == 1000) ? "SUCCESS" : "FAILURE"; | 11 var result = (window.pageYOffset >= 1000) ? "SUCCESS" : "FAILURE"; |
|
ymalik
2016/07/22 16:53:24
@skobes, the purpose of this test is to verify tha
skobes
2016/07/25 20:46:38
Acknowledged.
| |
| 12 if (window.testRunner) { | 12 if (window.testRunner) { |
| 13 testRunner.dumpAsText(); | 13 testRunner.dumpAsText(); |
| 14 document.write(result); | 14 document.write(result); |
| 15 } else | 15 } else |
| 16 alert(result); | 16 alert(result); |
| 17 </script> | 17 </script> |
| OLD | NEW |