blob: 414acbb5f9ed6fb0a2692074adf495c09610a7d0 [file] [log] [blame]
Tests layout of fixed positioned dialogs.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
showModal() should center in the viewport.
PASS dialog.getBoundingClientRect().top is centeredTop
The dialog is a positioned element, so the top and bottom should not have style auto.
PASS window.getComputedStyle(dialog).top is "290px"
PASS window.getComputedStyle(dialog).bottom is "290px"
The dialog shold stay centered on scroll.
PASS dialog.getBoundingClientRect().top is centeredTop
A tall dialog should be positioned at the top of the viewport.
PASS dialog.getBoundingClientRect().top is 0
The dialog should be centered regardless of the presence of a horizontal scrollbar.
PASS dialog.getBoundingClientRect().top is centeredTop
Centering should work when dialog is inside positioned containers.
PASS dialog.getBoundingClientRect().top is centeredTop
PASS dialog.getBoundingClientRect().top is centeredTop
A centered dialog's position should survive becoming display:none temporarily.
PASS dialog.getBoundingClientRect().top is expectedTop
Dialog should lose centering when removed from the document.
FAIL dialog.getBoundingClientRect().top should be 0. Was 800.
Dialog's specified position should survive after close() and showModal().
PASS dialog.getBoundingClientRect().top is expectedTop
Dialog should not be centered if showModal() was called when an ancestor had display 'none'.
FAIL dialog.getBoundingClientRect().top should be 0. Was 10016.
A dialog with specified 'top' should be positioned as usual
PASS dialog.getBoundingClientRect().top is offset
PASS successfullyParsed is true
TEST COMPLETE