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

Side by Side Diff: LayoutTests/fast/overflow/overflow-y-scroll.html

Issue 648913002: Clean up vestiges of ScrollView. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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>Bug 25313 : Missing scrollbars in GMail</title> 3 <title>Bug 25313 : Missing scrollbars in GMail</title>
4 <script> 4 <script>
5 if (window.testRunner) 5 if (window.testRunner)
6 window.testRunner.dumpAsText(); 6 window.testRunner.dumpAsText();
7 7
8 function inject() 8 function inject()
9 { 9 {
10 var content = '<html><head><style>' + 10 var content = '<html><head><style>' +
11 'html,body { margin: 0; overflow: hidden; height: 100%; widt h: 100% } ' + 11 'html,body { margin: 0; overflow: hidden; height: 100%; widt h: 100% } ' +
12 'html.scroll { overflow-x: auto; overflow-y: scroll; } ' + 12 'html.scroll { overflow-x: auto; overflow-y: scroll; } ' +
13 '</style><body><div id="offender" style="height: 900px;"></d iv></body></html>'; 13 '</style><body><div id="offender" style="height: 900px;"></d iv></body></html>';
14 var injectee = document.getElementById("injectee"); 14 var injectee = document.getElementById("injectee");
15 var doc = injectee.contentDocument; 15 var doc = injectee.contentDocument;
16 // inject an iframe 16 // inject an iframe
17 doc.open(); 17 doc.open();
18 doc.write(content); 18 doc.write(content);
19 doc.close(); 19 doc.close();
20 doc.getElementsByTagName("html")[0].className = "scroll"; 20 doc.getElementsByTagName("html")[0].className = "scroll";
21 // tickle ScrollView::updateScrollbars() 21 // tickle FrameView::updateScrollbars()
22 doc.getElementById("offender").scrollIntoView(false); 22 doc.getElementById("offender").scrollIntoView(false);
23 // trigger resize 23 // trigger resize
24 injectee.style.width = "400px"; 24 injectee.style.width = "400px";
25 // measure to see if there is a scrollbar. Pass if there is. 25 // measure to see if there is a scrollbar. Pass if there is.
26 document.getElementById("test").innerHTML = doc.body.offsetWidth < 400 ? "TEST PASSED" : "TEST FAILED"; 26 document.getElementById("test").innerHTML = doc.body.offsetWidth < 400 ? "TEST PASSED" : "TEST FAILED";
27 } 27 }
28 </script> 28 </script>
29 </head> 29 </head>
30 <body> 30 <body>
31 <p> 31 <p>
32 Tests <kbd>ScrollView</kbd>'s behavior when only one of the scrollba rs is made <kbd>ScrollbarAlwaysOn</kbd> dynamically. 32 Tests <kbd>FrameView</kbd>'s behavior when only one of the scrollbar s is made <kbd>ScrollbarAlwaysOn</kbd> dynamically.
33 The correct behavior is not to remove this scrollbar, which is what this test checks for. 33 The correct behavior is not to remove this scrollbar, which is what this test checks for.
34 </p> 34 </p>
35 <div id="test"> 35 <div id="test">
36 <iframe style="height:100%" id="injectee" onload="inject()"> 36 <iframe style="height:100%" id="injectee" onload="inject()">
37 </div> 37 </div>
38 </body> 38 </body>
39 </html> 39 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/resources/panScroll.js ('k') | LayoutTests/fast/overflow/overflow-y-scroll-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698