Chromium Code Reviews| Index: LayoutTests/fast/css/sticky/sticky-top-overflow-scroll-by-fragment.html |
| diff --git a/LayoutTests/fast/css/sticky/sticky-top-overflow.html b/LayoutTests/fast/css/sticky/sticky-top-overflow-scroll-by-fragment.html |
| similarity index 69% |
| copy from LayoutTests/fast/css/sticky/sticky-top-overflow.html |
| copy to LayoutTests/fast/css/sticky/sticky-top-overflow-scroll-by-fragment.html |
| index dfda8ae3db7452f59994493c3ebad433e3042c88..80ee18dc365aa2906adf893a37652c2e6d904dee 100644 |
| --- a/LayoutTests/fast/css/sticky/sticky-top-overflow.html |
| +++ b/LayoutTests/fast/css/sticky/sticky-top-overflow-scroll-by-fragment.html |
| @@ -1,6 +1,20 @@ |
| <!DOCTYPE html> |
| <html> |
| <head> |
| +<script> |
| + function done() |
| + { |
| + if (window.testRunner) |
| + window.testRunner.notifyDone(); |
| + } |
| + |
| +if (window.location.hash == '') { |
|
ojan
2014/03/05 02:53:26
Indentation is inconsistent with the above. Please
ostap
2014/03/05 05:04:28
Done.
|
| + if (window.testRunner) |
| + window.testRunner.waitUntilDone(); |
| + window.onhashchange = done; |
| + location = '#hash'; |
| +} |
| +</script> |
| <style> |
| .group { |
| display: inline-block; |
| @@ -14,12 +28,13 @@ |
| height: 550px; |
| overflow: hidden; /* Still scrollable with JS */ |
| border: 1px solid black; |
| + position: relative; |
| } |
| .spacer { |
| float: left; |
| width: 10px; |
| - height: 1200px; |
| + height: 500px; |
| } |
| .container { |
| width: 100px; |
| @@ -32,6 +47,14 @@ |
| height: 200px; |
| } |
| + .hash { |
| + width: 600px; |
| + height: 10px; |
| + background-color: gray; |
| + position: absolute; |
| + border: 0px; |
| + } |
| + |
| .sticky { |
| position: sticky; |
| top: 100px; |
| @@ -45,17 +68,8 @@ |
| background-color: red; |
| } |
| </style> |
| -<script> |
| - function doTest() |
| - { |
| - document.getElementById('overflow').scrollTop = 120; |
| - } |
| - window.addEventListener('load', doTest, false); |
| -</script> |
| </head> |
| <body> |
| -This test checks that sticky positioned elements are contained by their enclosing ancestor with an overflow clip. |
| -There should be no red. |
| <div id="overflow"> |
| <div class="spacer"></div> |
| <div class="group"> |
| @@ -78,6 +92,13 @@ There should be no red. |
| <div class="sticky box"></div> |
| </div> |
| </div> |
| + <div id="hash" class="hash" style="top: 119px;"> |
| + </div> |
| + </div> |
| + <div style="position: absolute; top: 560px;"> |
| + This test checks that sticky positioning when scrolled by fragment. |
| + There should be no red. |
| </div> |
| </body> |
| </html> |
| + |