| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../../resources/js-test.js"></script> | |
| 5 </head> | |
| 6 <body> | |
| 7 <dialog id="mydialog">It's my dialog.</dialog> | |
| 8 <script> | |
| 9 description("Tests that dialog is visible after show() is called and not visible
after close() is called. bug 90931"); | |
| 10 | |
| 11 dialog = document.getElementById('mydialog'); | |
| 12 computedStyle = window.getComputedStyle(dialog, null); | |
| 13 shouldBe("computedStyle.getPropertyValue('display')", "'none'"); | |
| 14 | |
| 15 dialog.show(); | |
| 16 computedStyle = window.getComputedStyle(dialog, null); | |
| 17 shouldBe("computedStyle.getPropertyValue('display')", "'block'"); | |
| 18 | |
| 19 dialog.close(); | |
| 20 computedStyle = window.getComputedStyle(dialog, null); | |
| 21 | |
| 22 shouldBe("computedStyle.getPropertyValue('display')", "'none'"); | |
| 23 shouldThrow('dialog.close();', '"InvalidStateError: Failed to execute \'close\'
on \'HTMLDialogElement\': The element does not have an \'open\' attribute, and t
herefore cannot be closed."'); | |
| 24 </script> | |
| 25 </body> | |
| 26 </html> | |
| OLD | NEW |