| Index: third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html b/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7a00ab4d2a5a8f0befe1563fed2da1eb2b684460
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html
|
| @@ -0,0 +1,44 @@
|
| +<!DOCTYPE html>
|
| +<style>
|
| +.box {
|
| + position: sticky;
|
| +}
|
| +
|
| +.without-top {
|
| + top: auto;
|
| +}
|
| +
|
| +.with-top {
|
| + top: 0px;
|
| +}
|
| +
|
| +.with-bottom {
|
| + bottom: 0px;
|
| +}
|
| +
|
| +</style>
|
| +
|
| +<body>
|
| + <div class="box without-top">Sticky, no top</div>
|
| + <div class="box with-top">Sticky, with top</div>
|
| + <div class="box with-bottom">Sticky, with bottom</div>
|
| +</body>
|
| +
|
| +<!-- top should be auto when not specified for sticky elements. Same for the
|
| +other attributes.-->
|
| +<script>
|
| + if (window.testRunner)
|
| + testRunner.dumpAsText();
|
| +
|
| + function doTest() {
|
| + var boxes = document.getElementsByClassName('box');
|
| + for (var i = 0; i < boxes.length; ++i) {
|
| + boxes[i].textContent += ': top = ' + getComputedStyle(boxes[i]).top;
|
| + boxes[i].textContent += '; bottom = ' + getComputedStyle(boxes[i]).bottom;
|
| + boxes[i].textContent += '; left = ' + getComputedStyle(boxes[i]).left;
|
| + boxes[i].textContent += '; right = ' + getComputedStyle(boxes[i]).right;
|
| + }
|
| + }
|
| +
|
| + window.addEventListener('load', doTest, false);
|
| +</script>
|
|
|