5 This test verifies that removing a horizontal scrollbar while the vertical
6 scrollbar's thumb is being dragged does not reset the vertical scroll offset.
23 ::-webkit-scrollbar-button {
26 background-color: gray;
28 ::-webkit-scrollbar-thumb {
31 background-color: blue;
37 <iframe id=
"f"></iframe>
40 var frame
= document
.getElementById("f").contentWindow
;
41 var frameBody
= frame
.document
.body
;
43 frameBody
.style
.width
= "2000px";
44 frameBody
.style
.height
= "2000px";
46 frame
.addEventListener('scroll', function() {
47 if (frameBody
.scrollTop
> 400)
48 frameBody
.style
.width
= "600px";
52 testRunner
.waitUntilDone();
54 // Tell eventSender not to batch mouse move events.
55 eventSender
.dragMode
= false;
57 eventSender
.mouseMoveTo(790, 50);
58 eventSender
.mouseDown();
59 eventSender
.mouseMoveTo(790, 250);
61 frame
.addEventListener('scroll', finish
);
65 eventSender
.mouseMoveTo(790, 350);
66 eventSender
.mouseUp();
68 document
.body
.innerText
= frameBody
.scrollTop
> 0 ? "PASS" : "FAIL";
70 testRunner
.dumpAsText();
71 testRunner
.notifyDone();
74 if (window
.testRunner
&& window
.eventSender
)
77 frameBody
.innerText
= 'Scroll down by dragging the thumb. ' +
78 'Test passes if scroll offset does not jump back to 0.';