| OLD | NEW |
| (Empty) | |
| 1 <!-- |
| 2 @BLINK-ALLOW:pageLocation* |
| 3 @BLINK-ALLOW:scrollY=* |
| 4 @WAIT-FOR:After |
| 5 --> |
| 6 <!DOCTYPE html> |
| 7 <html> |
| 8 <head> |
| 9 <style> |
| 10 body { |
| 11 margin: 0; |
| 12 padding: 0; |
| 13 transform: translate(100px); |
| 14 } |
| 15 .big { |
| 16 height: 1000px; |
| 17 } |
| 18 .fixed { |
| 19 position: fixed; |
| 20 left: 100px; |
| 21 top: 100px; |
| 22 } |
| 23 </style> |
| 24 </head> |
| 25 <body> |
| 26 <div class="big">Before</div> |
| 27 <div class="fixed">Fixed</div> |
| 28 <div id="after"></div> |
| 29 <script> |
| 30 // Wait for a short timeout to ensure the initial accessibility tree |
| 31 // contains the unscrolled layout. Then scroll the page, and change |
| 32 // the accessible text of an element to contain the text "After" to |
| 33 // signal that the test is done running. |
| 34 // |
| 35 // NOTE: We use aria-label to trigger the test being done rather than |
| 36 // adding text to the page, because adding text to the page triggers |
| 37 // layout, and triggering layout would actually force an update of a |
| 38 // fixed-position element! The purpose of this test is to ensure that |
| 39 // fixed-position elements work correctly when scrolling, so we need to |
| 40 // make sure we only scroll and not layout again. |
| 41 window.setTimeout(function() { |
| 42 window.scrollTo(0, 50); |
| 43 document.getElementById("after").setAttribute("aria-label", "After"); |
| 44 }, 100); |
| 45 </script> |
| 46 </body> |
| 47 </html> |
| OLD | NEW |