14 background-color: blue;
17 <script src=
"../../resources/testharness.js"></script>
18 <script src=
"../../resources/testharnessreport.js"></script>
19 <script src=
"resources/scroll-behavior-test.js"></script>
20 <script type=
"text/javascript">
21 function getEndPosition(testCase
, startPosition
) {
23 endPosition
.x
= startPosition
.x
;
24 endPosition
.y
= testCase
.y
;
28 function jsScroll(testCase
) {
29 var element
= document
.getElementById("container");
30 element
.scrollTop
= testCase
.y
;
34 {css
: "auto", x
: 0, y
: 2},
35 {css
: "auto", x
: 0, y
: 4},
36 {css
: "smooth", waitForEnd
: true, x
: 0, y
: 25},
37 {css
: "smooth", waitForEnd
: true, x
: 0, y
: 45},
38 {css
: "smooth", waitForEnd
: false, x
: 0, y
: 4100},
39 {css
: "smooth", waitForEnd
: false, x
: 0, y
: 20},
45 for (var i
= 0; i
< testScrolls
.length
; i
++) {
46 testCases
.push(new ScrollBehaviorTestCase(testScrolls
[i
]));
49 var element
= document
.getElementById("container");
50 var scrollBehaviorTest
= new ScrollBehaviorTest(element
,
55 scrollBehaviorTest
.run();
58 window
.addEventListener('load', doTest
, false);
63 <p>Test that setting scrollTop on an overflow:scroll element works with both scroll behaviors
</p>
65 <div id=
"content"></div>