OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script> |
| 3 if (window.internals) { |
| 4 internals.settings.setCSSStickyPositionEnabled(true); |
| 5 } |
| 6 </script> |
| 7 |
| 8 <html> |
| 9 <head> |
| 10 <style> |
| 11 body { |
| 12 margin: 0; |
| 13 height: 2000px; |
| 14 } |
| 15 |
| 16 .box { |
| 17 width: 200px; |
| 18 height: 200px; |
| 19 } |
| 20 |
| 21 .sticky { |
| 22 position: sticky; |
| 23 top: 100px; |
| 24 background-color: green; |
| 25 } |
| 26 </style> |
| 27 <script> |
| 28 if (window.testRunner) |
| 29 testRunner.dumpAsText(); |
| 30 |
| 31 function doTest() |
| 32 { |
| 33 var stickyBox = document.getElementById('sticky'); |
| 34 stickyBox.parentNode.removeChild(stickyBox); |
| 35 window.scrollTo(0, 10); |
| 36 } |
| 37 window.addEventListener('load', doTest, false); |
| 38 </script> |
| 39 </head> |
| 40 <body> |
| 41 <p>This test should not crash</p> |
| 42 <div id="sticky" class="sticky box"></div> |
| 43 </body> |
| 44 </html> |
OLD | NEW |