blob: 9f48945bec1b562b85df6d9bcc055df85d297626 [file] [log] [blame]
Scrolled position should be restored when the div is hidden and shown again
Div will be moved here.
Scrolling to 0, 75
Div's display is none now
PASS e.scrollTop is 0
Div's display is block again
PASS e.scrollTop is 75
Test that after changing the scroll position to different values the scroll position is restored
Scrolling to 50, 50
Div's display is none now
PASS e.scrollTop is 0
PASS e.scrollLeft is 0
Div's display is block again
PASS e.scrollTop is 50
PASS e.scrollLeft is 50
Scrolling to 30, 10
Div's display is none now
PASS e.scrollTop is 0
PASS e.scrollLeft is 0
Div's display is block again
PASS e.scrollTop is 10
PASS e.scrollLeft is 30
Scrolling to 100, 0
Div's display is none now
PASS e.scrollTop is 0
PASS e.scrollLeft is 0
Div's display is block again
PASS e.scrollTop is 0
PASS e.scrollLeft is 100
Testing that scroll position is restored when height and width of scrolling area is changed
Scrolling to 35, 75
Div's display is none now
PASS e.scrollTop is 0
PASS e.scrollLeft is 0
Div's display is block again
PASS e.scrollTop is 75
PASS e.scrollLeft is 35
Adding some more text to div
Scrolling to 125, 100
Div's display is none now
PASS e.scrollTop is 0
PASS e.scrollLeft is 0
Div's display is block again
PASS e.scrollTop is 100
PASS e.scrollLeft is 125
Test that scroll position is reset when the node is moved to different location in the document
PASS e.scrollTop is 0
PASS e.scrollLeft is 0
Testing that scroll position is restored for RTL texts
Scrolling to 50, 150
Div's display is none now
PASS e.scrollTop is 0
PASS e.scrollLeft is 0
Div's display is block again
PASS e.scrollTop is 150
PASS e.scrollLeft is 50
Test iframe scrolling
Scrolling Iframe to (50, 75)
Iframe's display is none now
Iframe's display is block again
PASS frame.contentWindow.pageYOffset is 75
PASS frame.contentWindow.pageXOffset is 50
Testing scroll offset getting reset when moved to other document
Scrolling div to (50, 75)
PASS e.scrollTop is 0
PASS e.scrollLeft is 0
PASS successfullyParsed is true
TEST COMPLETE