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

Side by Side Diff: third_party/WebKit/LayoutTests/paint/invalidation/spv2/updating-scrolling-content-as-text.html

Issue 1366763002: Text expectations of paint/invalidation/spv2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 <!-- Based on compositing/overflow/updating-scrolling-content.html --> 1 <!-- Based on compositing/overflow/updating-scrolling-content.html -->
2 <!DOCTYPE html> 2 <!DOCTYPE html>
3 3
4 <!-- 4 <!--
5 This test checks that the contents of accelerated scrolling layers are properly 5 This test checks that the contents of accelerated scrolling layers are properly
6 updated also outside the current overflow clip. See 6 updated also outside the current overflow clip. See
7 https://bugs.webkit.org/show_bug.cgi?id=100524. 7 https://bugs.webkit.org/show_bug.cgi?id=100524.
8 --> 8 -->
9 9
10 <html> 10 <html>
(...skipping 10 matching lines...) Expand all
21 background: red; 21 background: red;
22 height: 200px; 22 height: 200px;
23 } 23 }
24 24
25 #content { 25 #content {
26 height: 1000px; 26 height: 1000px;
27 } 27 }
28 </style> 28 </style>
29 <script src="resources/paint-invalidation-test.js"></script> 29 <script src="resources/paint-invalidation-test.js"></script>
30 <script type="text/javascript"> 30 <script type="text/javascript">
31 if (window.testRunner)
32 testRunner.dumpAsText();
31 if (window.internals) 33 if (window.internals)
32 window.internals.settings.setPreferCompositingToLCDTextEnabled(true); 34 window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
33 35
34 window.addEventListener('load', function() { 36 window.addEventListener('load', function() {
35 var scroller = document.getElementById('scroller'); 37 var scroller = document.getElementById('scroller');
36 var indicator = document.getElementById('indicator'); 38 var indicator = document.getElementById('indicator');
37 39
38 // Make sure the scrolling content is painted before we start. 40 // Make sure the scrolling content is painted before we start.
39 scroller.offsetTop; 41 scroller.offsetTop;
40 42
41 // Scroll all the way to the bottom and change the color of the 43 // Scroll all the way to the bottom and change the color of the
42 // indicator (which is now outside the overflow clip). 44 // indicator (which is now outside the overflow clip).
43 scroller.scrollTop = 1000; 45 scroller.scrollTop = 1000;
44 46
45 runPaintInvalidationTest(); 47 runPaintInvalidationTest();
46 }); 48 });
47 49
48 window.expectedPaintInvalidationObjects = [
49 "LayoutBlockFlow DIV id='indicator'",
50 "LayoutBlockFlow DIV id='indicator'",
51 ];
52 function paintInvalidationTest() { 50 function paintInvalidationTest() {
53 var scroller = document.getElementById('scroller'); 51 var scroller = document.getElementById('scroller');
54 var indicator = document.getElementById('indicator'); 52 var indicator = document.getElementById('indicator');
55 53
56 indicator.style.background = 'green'; 54 indicator.style.background = 'green';
57 55
58 // Scroll back up so that the updated (green) indicator is visible. 56 // Scroll back up so that the updated (green) indicator is visible.
59 scroller.scrollTop = 0; 57 scroller.scrollTop = 0;
60 } 58 }
61 </script> 59 </script>
62 </head> 60 </head>
63 <body> 61 <body>
64 <div id="scroller"> 62 <div id="scroller">
65 <div id="indicator"></div> 63 <div id="indicator"></div>
66 <div id="content"></div> 64 <div id="content"></div>
67 </div> 65 </div>
68 </body> 66 </body>
69 </html> 67 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698