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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-behind-scrollbar.html

Issue 1413493005: Update layout tests to work when smooth scrolling is enabled by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: worked on nit Created 5 years, 1 month 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
OLDNEW
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698