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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/execCommand/insert-line-break-no-scroll.html

Issue 2165763002: Fix layout tests that would fail if ScrollAnchoring was promoted to experimental (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/draw-focus-if-needed-scrolls.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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";
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>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/draw-focus-if-needed-scrolls.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698