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

Side by Side Diff: LayoutTests/fast/dom/elementFromPoint-scaled-scrolled.html

Issue 1301523006: Fixed layout tests to be scroll order agnostic (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added comment Created 5 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 | LayoutTests/fast/dom/zoom-scroll-page-test.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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 </head> 4 </head>
5 <body onload="runTest();" style="width:2000px;height:2000px;margin:0px;padding:1 00px"> 5 <body onload="runTest();" style="width:2000px;height:2000px;margin:0px;padding:1 00px">
6 <button style="width:50px;height:50px;">B1</button><button style="width:50px;hei ght:50px;">B2</button><button style="width:50px;height:50px;">B3</button> 6 <button style="width:50px;height:50px;">B1</button><button style="width:50px;hei ght:50px;">B2</button><button style="width:50px;height:50px;">B3</button>
7 <div>This test is successful if elementFromPoint returns the correct element.</d iv> 7 <div>This test is successful if elementFromPoint returns the correct element.</d iv>
8 <div id="result"></div> 8 <div id="result"></div>
9 <script> 9 <script>
10 function runTest() { 10 function runTest() {
11 // Scroll before scaling so we scroll the layout viewport rather than the vi sual.
12 window.scrollTo(100,100);
11 if (window.internals) 13 if (window.internals)
12 window.internals.setPageScaleFactor(2); 14 window.internals.setPageScaleFactor(2);
13 window.scrollTo(100,100);
14 15
15 if (window.testRunner) 16 if (window.testRunner)
16 testRunner.dumpAsText(); 17 testRunner.dumpAsText();
17 18
18 document.getElementById("result").innerText = document.elementFromPoint(125, 25).innerText; 19 document.getElementById("result").innerText = document.elementFromPoint(125, 25).innerText;
19 } 20 }
20 </script> 21 </script>
21 </script> 22 </script>
22 </body> 23 </body>
23 </html> 24 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/zoom-scroll-page-test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698