OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../resources/js-test.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
3 <style> | 3 <style> |
4 #f { | 4 #f { |
5 position: fixed; | 5 position: fixed; |
6 background-color: #def; | 6 background-color: #def; |
7 width: 600px; | 7 width: 600px; |
8 height: 400px; | 8 height: 400px; |
9 right: -20px; | 9 right: -20px; |
10 bottom: -20px; | 10 bottom: -20px; |
11 } | 11 } |
12 body { | 12 body { |
13 width: 1000px; | 13 width: 1000px; |
14 height: 1000px; | 14 height: 1000px; |
15 } | 15 } |
16 </style> | 16 </style> |
17 Tests that the scrollbar can be clicked even when it clips a position:fixed | 17 Tests that the scrollbar can be clicked even when it clips a position:fixed |
18 element, and that the scrollbars are excluded from the viewport for determining | 18 element, and that the scrollbars are excluded from the viewport for determining |
19 the element's position. | 19 the element's position. |
20 <div id="f"></div> | 20 <div id="f"></div> |
21 <script> | 21 <script> |
| 22 window.jsTestIsAsync = true; |
22 | 23 |
23 eventSender.mouseMoveTo(790, 500); | 24 function finishTest() { |
24 eventSender.mouseDown(); | 25 var rect = document.querySelector("#f").getBoundingClientRect(); |
25 eventSender.mouseUp(); | 26 shouldBe(rect.left + "," + rect.top, "205,205"); |
| 27 finishJSTest(); |
| 28 } |
26 | 29 |
27 var rect = document.querySelector("#f").getBoundingClientRect(); | 30 function runTest() { |
| 31 eventSender.mouseMoveTo(790, 500); |
| 32 eventSender.mouseDown(); |
| 33 eventSender.mouseUp(); |
| 34 shouldBecomeEqual('scrollY > 0', 'true', finishTest); |
| 35 } |
28 | 36 |
29 shouldBeTrue(String(scrollY > 0)); | 37 onload = runTest; |
30 shouldBe(rect.left + "," + rect.top, "205,205"); | |
31 | 38 |
32 </script> | 39 </script> |
OLD | NEW |