| Index: third_party/WebKit/LayoutTests/fast/loader/clamping-preserves-fragment-anchor.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/loader/clamping-preserves-fragment-anchor.html b/third_party/WebKit/LayoutTests/fast/loader/clamping-preserves-fragment-anchor.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..765b16550e6769793d24626af4593dfc427ac0ab
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/loader/clamping-preserves-fragment-anchor.html
|
| @@ -0,0 +1,32 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<style>
|
| +
|
| +body { height: 1400px; }
|
| +body.shrink { height: 1000px; }
|
| +
|
| +#anchor {
|
| + display: block;
|
| + position: absolute;
|
| + width: 100px;
|
| + height: 100px;
|
| + background-color: #fdd;
|
| + left: 200px;
|
| + top: 600px;
|
| +}
|
| +
|
| +</style>
|
| +<a id="anchor" name="foo"></a>
|
| +<script>
|
| +
|
| +test(function(t) {
|
| + location.hash = "#foo";
|
| + assert_equals(scrollY, 600);
|
| + document.body.className = "shrink";
|
| + document.body.offsetHeight; // Force layout.
|
| + anchor.style.top = "200px";
|
| + assert_equals(scrollY, 200);
|
| +}, "Preserve fragment anchor if clamping occurs during load.");
|
| +
|
| +</script>
|
|
|