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

Side by Side Diff: LayoutTests/fast/forms/autofocus-opera-003.html

Issue 1133693002: Update most LayoutTests to be agnostic to scrollTopLeftInterop mode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tdresser cr feedback Created 5 years, 7 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <title>"autofocus" scrolling test</title> 3 <title>"autofocus" scrolling test</title>
4 <style> 4 <style>
5 p#test{ position:absolute; top:150% } 5 p#test{ position:absolute; top:150% }
6 input { background:red } 6 input { background:red }
7 input:focus { background:lime } 7 input:focus { background:lime }
8 </style> 8 </style>
9 <script src="resources/common.js"></script> 9 <script src="resources/common.js"></script>
10 <script language="JavaScript" type="text/javascript"> 10 <script language="JavaScript" type="text/javascript">
11 function log(message) { 11 function log(message) {
12 document.getElementById("console").innerHTML += "<li>"+message+"</li>"; 12 document.getElementById("console").innerHTML += "<li>"+message+"</li>";
13 } 13 }
14 14
15 function test() { 15 function test() {
16 if (window.testRunner) 16 if (window.testRunner)
17 testRunner.dumpAsText(); 17 testRunner.dumpAsText();
18 18
19 if (document.activeElement == document.getElementsByTagName("input")[0] && 19 if (document.activeElement == document.getElementsByTagName("input")[0] &&
20 document.body.scrollTop != 0) 20 document.scrollingElement.scrollTop != 0)
21 log("SUCCESS"); 21 log("SUCCESS");
22 else 22 else
23 log("FAILURE"); 23 log("FAILURE");
24 if (window.testRunner) 24 if (window.testRunner)
25 testRunner.notifyDone(); 25 testRunner.notifyDone();
26 } 26 }
27 27
28 waitUntilLoadedAndAutofocused(function() { setTimeout(test, 0)}); 28 waitUntilLoadedAndAutofocused(function() { setTimeout(test, 0)});
29 </script> 29 </script>
30 </head> 30 </head>
31 <body> 31 <body>
32 <p id="test">This form control should have a green background: <input autofocus> 32 <p id="test">This form control should have a green background: <input autofocus>
33 <hr> 33 <hr>
34 <ol id="console"></ol> 34 <ol id="console"></ol>
35 </body> 35 </body>
36 </html> 36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698