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

Side by Side Diff: LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling-after-sibling-z-index-change.html

Issue 244193002: Enable universal accelerated overflow scroll (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update test expectations for crashing test. Created 6 years, 8 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
(Empty)
1 <!DOCTYPE html>
2
3 <html>
4 <head>
5 <style>
6 #container {
7 width: 200px;
8 height: 200px;
9 overflow: scroll;
10 margin: 20px;
11 border: 1px solid black;
12 background-color: #00FFFF;
13 }
14
15 .scrolled {
16 width: 800px;
17 height: 30px;
18 margin: 10px;
19 top: 70px;
20 background-color: gray;
21 position: relative;
22 }
23
24 .positioned {
25 width: 120px;
26 height: 240px;
27 position: absolute;
28 }
29
30 #predecessor {
31 left: 20px;
32 top: 20px;
33 background-color: #990066;
34 }
35 </style>
36 <script src='resources/automatically-opt-into-composited-scrolling.js'></scr ipt>
37 <script>
38 if (window.testRunner)
39 testRunner.dumpAsText();
40
41 if (window.internals) {
42 window.internals.settings.setAcceleratedCompositingForOverflowScroll Enabled(true);
43 window.internals.settings.setCompositorDrivenAcceleratedScrollingEna bled(false);
44 }
45
46 function doTest()
47 {
48 if (!window.internals)
49 return;
50
51 var predecessor = document.getElementById('predecessor');
52 var container = document.getElementById('container');
53
54 predecessor.style.zIndex = '5';
55 window.internals.forceCompositingUpdate(document);
56
57 var pass = true;
58 if (!didOptIn(container)) {
59 pass = false;
60 write('FAIL - did not opt in when our children are contiguous.') ;
61 }
62
63 predecessor.style.zIndex = '';
64 window.internals.forceCompositingUpdate(document);
65
66 if (didOptIn(container)) {
67 pass = false;
68 write('FAIL - opted in when our children are not contiguous.');
69 }
70
71 if (pass)
72 write('PASS');
73 }
74
75 window.addEventListener('load', doTest, false);
76 </script>
77 </head>
78
79 <body>
80 <div>
81 <div class='positioned' id='predecessor'></div>
82 <div id='container'>
83 <div class='scrolled'></div>
84 </div>
85 </div>
86 <pre id='console'></pre>
87 </body>
88 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698