blob: f6824e02561e43beb9fd6bf362196d18a027979a [file] [log] [blame]
This test zooms and scrolls the page and checks the positions of fixed-position objects.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
JSON.stringify(internals.layoutViewportRect()) is {"x":0,"y":0,"width":800,"height":600,"top":0,"right":800,"bottom":600,"left":0}
JSON.stringify(internals.visualViewportRect()) is {"x":0,"y":0,"width":400,"height":257,"top":0,"right":400,"bottom":257,"left":0}
client rect of top:
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":800,"height":100,"top":0,"right":800,"bottom":100,"left":0}
client rect of bottom:
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":500,"width":800,"height":100,"top":500,"right":800,"bottom":600,"left":0}
client rect of left:
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":100,"height":600,"top":0,"right":100,"bottom":600,"left":0}
client rect of right:
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":700,"y":0,"width":100,"height":600,"top":0,"right":800,"bottom":600,"left":700}
Scrolled to 475, 525
JSON.stringify(internals.layoutViewportRect()) is {"x":75,"y":182,"width":800,"height":600,"top":182,"right":875,"bottom":782,"left":75}
JSON.stringify(internals.visualViewportRect()) is {"x":475,"y":482,"width":400,"height":300,"top":482,"right":875,"bottom":782,"left":475}
client rect of top:
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-400,"y":-343,"width":800,"height":100,"top":-343,"right":400,"bottom":-243,"left":-400}
client rect of bottom:
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-400,"y":157,"width":800,"height":100,"top":157,"right":400,"bottom":257,"left":-400}
client rect of left:
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-400,"y":-343,"width":100,"height":600,"top":-343,"right":-300,"bottom":257,"left":-400}
client rect of right:
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":300,"y":-343,"width":100,"height":600,"top":-343,"right":400,"bottom":257,"left":300}
Scrolled to 100, 776
JSON.stringify(internals.layoutViewportRect()) is {"x":75,"y":433,"width":800,"height":600,"top":433,"right":875,"bottom":1033,"left":75}
JSON.stringify(internals.visualViewportRect()) is {"x":100,"y":733,"width":400,"height":300,"top":733,"right":500,"bottom":1033,"left":100}
client rect of top:
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-25,"y":-343,"width":800,"height":100,"top":-343,"right":775,"bottom":-243,"left":-25}
client rect of bottom:
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-25,"y":157,"width":800,"height":100,"top":157,"right":775,"bottom":257,"left":-25}
client rect of left:
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-25,"y":-343,"width":100,"height":600,"top":-343,"right":75,"bottom":257,"left":-25}
client rect of right:
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":675,"y":-343,"width":100,"height":600,"top":-343,"right":775,"bottom":257,"left":675}
Scrolled to 50, 300
JSON.stringify(internals.layoutViewportRect()) is {"x":50,"y":257,"width":800,"height":600,"top":257,"right":850,"bottom":857,"left":50}
JSON.stringify(internals.visualViewportRect()) is {"x":50,"y":257,"width":400,"height":300,"top":257,"right":450,"bottom":557,"left":50}
client rect of top:
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":-43,"width":800,"height":100,"top":-43,"right":800,"bottom":57,"left":0}
client rect of bottom:
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":457,"width":800,"height":100,"top":457,"right":800,"bottom":557,"left":0}
client rect of left:
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":-43,"width":100,"height":600,"top":-43,"right":100,"bottom":557,"left":0}
client rect of right:
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":700,"y":-43,"width":100,"height":600,"top":-43,"right":800,"bottom":557,"left":700}
PASS successfullyParsed is true
TEST COMPLETE