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

Side by Side Diff: LayoutTests/compositing/overflow/ignore-main-thread-scroll-reasons-when-main-frame-not-scrollable.html

Issue 23641004: Ignore should-scroll-on-main-thread if main frame is not scrollable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated tests. Created 7 years, 3 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 <html>
3 <head>
4 <style>
5 .non-layer-viewport-constrained {
6 position: fixed;
7 }
8
9 .box {
10 width: 50px;
11 height: 50px;
12 }
13
14 .container {
15 overflow: scroll;
16 border: 1px solid black;
17 }
18
19 .container-element {
20 position: relative;
21 background-color: blue;
22 margin: 10px;
23 }
24
25 #sibling {
26 top: 220px;
27 left: 10px;
28 background-color: green;
29 }
30
31 #parent {
32 position: absolute;
33 left: 10px;
34 top: 10px;
35 width: 200px;
36 height: 200px;
37 }
38
39 #description {
40 position: absolute;
41 top: 300px;
42 left: 10px;
43 }
44
45 #console {
46 position: absolute;
47 top: 290px;
48 left: 10px;
49 }
50
51 </style>
52 <script src="../../fast/js/resources/js-test-pre.js"></script>
53 <script>
54 if (window.testRunner) {
55 // Our fixed position element must not be composited; this is a trigger for
56 // forcing main thread compositing.
57 window.internals.settings.setForceCompositingMode(true);
58 window.internals.settings.setAcceleratedCompositingForFixedPositionEnabled(f alse);
59 window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled( true);
60 }
61
62 function runTest() {
63 if (window.internals) {
64 var reasons = internals.mainThreadScrollingReasons(document);
65 if (reasons === '')
66 testPassed("No main thread scrolling reasons.");
67 else
68 testFailed("Should have found no main thread scrolling reasons. " +
69 "Instead, they were '" + reasons + "'.");
70 } else {
71 debug("This test requires window.internals.");
72 description("This test ensures that when the main frame cannot be " +
73 "scrolled, we ignore reasons for scrolling on the main " +
74 "thread that only matter when the main frame scrolls");
75 }
76 }
77
78 window.onload = runTest;
79 </script>
80 <script src="../../fast/js/resources/js-test-post.js"></script>
81 </head>
82 <body>
83 <div class="non-layer-viewport-constrained box" id="sibling"></div>
84 <div class="container" id="parent">
85 <div class="box container-element"></div>
86 <div class="box container-element"></div>
87 <div class="box container-element"></div>
88 <div class="box container-element"></div>
89 <div class="box container-element"></div>
90 </div>
91 </body>
92 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698