| OLD | NEW |
| 1 Tests positioning of non-anchored dialogs. | 1 Tests layout of absolutely positioned modal dialogs. |
| 2 | 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 | 4 |
| 5 | 5 |
| 6 |
| 6 showModal() should center in the viewport. | 7 showModal() should center in the viewport. |
| 7 PASS dialog.getBoundingClientRect().top is centeredTop | 8 PASS dialog.getBoundingClientRect().top is centeredTop |
| 8 | 9 |
| 9 The computed top and bottom of a centered dialog should still have position auto | 10 The computed top and bottom of a centered dialog should still have position auto
. |
| 10 PASS window.getComputedStyle(dialog).top is "auto" | 11 PASS window.getComputedStyle(dialog).top is "auto" |
| 11 PASS window.getComputedStyle(dialog).bottom is "auto" | 12 PASS window.getComputedStyle(dialog).bottom is "auto" |
| 12 | 13 |
| 13 Dialog should be recentered if showModal() is called after close(). | 14 Dialog should be recentered if showModal() is called after close(). |
| 14 PASS dialog.getBoundingClientRect().top is centeredTop | 15 PASS dialog.getBoundingClientRect().top is centeredTop |
| 15 | 16 |
| 16 Dialog should not be recentered on a relayout. | 17 Dialog should not recenter on relayout. |
| 17 PASS dialog.getBoundingClientRect().top is expectedTop | 18 PASS dialog.getBoundingClientRect().top is expectedTop |
| 18 | 19 |
| 19 A tall dialog should be positioned at the top of the viewport. | 20 A tall dialog should be positioned at the top of the viewport. |
| 20 PASS dialog.getBoundingClientRect().top is 0 | 21 PASS dialog.getBoundingClientRect().top is 0 |
| 21 | 22 |
| 22 The dialog should be centered regardless of the presence of a horizontal scrollb
ar. | 23 The dialog should be centered regardless of the presence of a horizontal scrollb
ar. |
| 23 PASS dialog.getBoundingClientRect().top is centeredTop | 24 PASS dialog.getBoundingClientRect().top is centeredTop |
| 24 | 25 |
| 25 Test that centering works when dialog is inside positioned containers. | 26 Centering should work when dialog is inside positioned containers. |
| 26 PASS dialog.getBoundingClientRect().top is centeredTop | 27 PASS dialog.getBoundingClientRect().top is centeredTop |
| 27 PASS dialog.getBoundingClientRect().top is centeredTop | 28 PASS dialog.getBoundingClientRect().top is centeredTop |
| 28 | 29 |
| 29 Dialog's position should survive after becoming display:none temporarily. | 30 A centered dialog's position should survive becoming display:none temporarily. |
| 30 PASS dialog.getBoundingClientRect().top is expectedTop | 31 PASS dialog.getBoundingClientRect().top is expectedTop |
| 31 | 32 |
| 32 Dialog loses centering position when removed from document. | 33 Dialog should lose centering when removed from the document. |
| 33 PASS dialog.getBoundingClientRect().top is relativeContainer.getBoundingClientRe
ct().top | 34 PASS dialog.getBoundingClientRect().top is relativeContainer.getBoundingClientRe
ct().top |
| 34 | 35 |
| 35 Dialog's specified position should survive after close() and showModal(). | 36 Dialog's specified position should survive after close() and showModal(). |
| 36 PASS dialog.getBoundingClientRect().top is expectedTop | 37 PASS dialog.getBoundingClientRect().top is expectedTop |
| 37 | 38 |
| 38 Dialog is recentered if showModal() is called after removing 'open' | 39 Dialog should be recentered if showModal() is called after removing 'open'. |
| 39 PASS dialog.getBoundingClientRect().top is centeredTop | 40 PASS dialog.getBoundingClientRect().top is centeredTop |
| 40 | 41 |
| 41 Dialog should not be centered if showModal() was called when an ancestor had dis
play 'none'. | 42 Dialog should not be centered if showModal() was called when an ancestor had dis
play 'none'. |
| 42 PASS dialog.getBoundingClientRect().top is expectedTop | 43 PASS dialog.getBoundingClientRect().top is document.body.getBoundingClientRect()
.bottom |
| 43 | 44 |
| 44 Test setting 'top' on an abspos modal dialog | 45 A dialog with specified 'top' should be positioned as usual |
| 45 PASS dialog.getBoundingClientRect().top + window.scrollY is offset | 46 PASS dialog.getBoundingClientRect().top + window.scrollY is offset |
| 46 | 47 |
| 47 Test setting 'bottom' on an abspos modal dialog | 48 A dialog with specified 'bottom' should be positioned as usual |
| 48 PASS dialog.getBoundingClientRect().bottom + window.scrollY is window.innerHeigh
t - offset | 49 PASS dialog.getBoundingClientRect().bottom + window.scrollY is window.innerHeigh
t - offset |
| 49 | |
| 50 Test fixed position for a modal dialog | |
| 51 PASS dialog.getBoundingClientRect().top is offset | |
| 52 | |
| 53 Test absolute position for a non-modal dialog | |
| 54 PASS dialog.getBoundingClientRect().top is relativeContainer.getBoundingClientRe
ct().top + offset | |
| 55 | |
| 56 Test static position for a non-modal dialog | |
| 57 PASS dialog.getBoundingClientRect().top is relativeContainer.getBoundingClientRe
ct().top | |
| 58 | |
| 59 Test relative position for a non-modal dialog | |
| 60 PASS dialog.getBoundingClientRect().top is relativeContainer.getBoundingClientRe
ct().top + offset | |
| 61 PASS dialog.getBoundingClientRect().left is relativeContainer.getBoundingClientR
ect().left + offset | |
| 62 PASS successfullyParsed is true | 50 PASS successfullyParsed is true |
| 63 | 51 |
| 64 TEST COMPLETE | 52 TEST COMPLETE |
| 65 | 53 |
| OLD | NEW |