| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <style> |
| 5 |
| 6 body { height: 1400px; } |
| 7 body.shrink { height: 1000px; } |
| 8 |
| 9 #anchor { |
| 10 display: block; |
| 11 position: absolute; |
| 12 width: 100px; |
| 13 height: 100px; |
| 14 background-color: #fdd; |
| 15 left: 200px; |
| 16 top: 600px; |
| 17 } |
| 18 |
| 19 </style> |
| 20 <a id="anchor" name="foo"></a> |
| 21 <script> |
| 22 |
| 23 test(function(t) { |
| 24 location.hash = "#foo"; |
| 25 assert_equals(scrollY, 600); |
| 26 document.body.className = "shrink"; |
| 27 document.body.offsetHeight; // Force layout. |
| 28 anchor.style.top = "200px"; |
| 29 assert_equals(scrollY, 200); |
| 30 }, "Preserve fragment anchor if clamping occurs during load."); |
| 31 |
| 32 </script> |
| OLD | NEW |