14 background-color: blue;
17 <script src=
"../../resources/js-test.js"></script>
18 <script type=
"text/javascript">
20 description("This test checks that a smooth scroll finishes even when composited scrolling " +
21 "is lost during the animation.");
23 function startSmoothScroll() {
24 var scrollToOptions
= {behavior
: "smooth", top
: 6000};
25 document
.getElementById("container").scrollTo(scrollToOptions
);
26 window
.requestAnimationFrame(preventCompositedScrolling
);
29 function preventCompositedScrolling() {
30 document
.getElementById("container").style
.borderRadius
= "4px";
31 window
.requestAnimationFrame(waitForSmoothScrollEnd
);
34 function waitForSmoothScrollEnd() {
35 if (document
.getElementById("container").scrollTop
== 6000) {
36 testPassed("Scroll destination reached.");
39 window
.requestAnimationFrame(waitForSmoothScrollEnd
);
43 window
.onload = function() {
44 if (window
.internals
) {
45 window
.internals
.settings
.setPreferCompositingToLCDTextEnabled(true);
48 window
.requestAnimationFrame(startSmoothScroll
);
55 <div id=
"content"></div>