| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../js/resources/js-test-pre.js"></script> |
| 5 <script> | 5 <script> |
| 6 if (window.internals) | 6 if (window.internals) |
| 7 internals.settings.setDialogElementEnabled(true); | 7 internals.settings.setDialogElementEnabled(true); |
| 8 </script> | 8 </script> |
| 9 </head> | 9 </head> |
| 10 <body> | 10 <body> |
| 11 <dialog id="mydialog">It's my dialog.</dialog> | 11 <dialog id="mydialog">It's my dialog.</dialog> |
| 12 <script> | 12 <script> |
| 13 description("Tests that dialog is visible after show() is called and not visible
after close() is called. bug 90931"); | 13 description("Tests that dialog is visible after show() is called and not visible
after close() is called. bug 90931"); |
| 14 | 14 |
| 15 dialog = document.getElementById('mydialog'); | 15 dialog = document.getElementById('mydialog'); |
| 16 computedStyle = window.getComputedStyle(dialog, null); | 16 computedStyle = window.getComputedStyle(dialog, null); |
| 17 shouldBe("computedStyle.getPropertyValue('display')", "'none'"); | 17 shouldBe("computedStyle.getPropertyValue('display')", "'none'"); |
| 18 | 18 |
| 19 dialog.show(); | 19 dialog.show(); |
| 20 computedStyle = window.getComputedStyle(dialog, null); | 20 computedStyle = window.getComputedStyle(dialog, null); |
| 21 shouldBe("computedStyle.getPropertyValue('display')", "'block'"); | 21 shouldBe("computedStyle.getPropertyValue('display')", "'block'"); |
| 22 | 22 |
| 23 dialog.close(); | 23 dialog.close(); |
| 24 computedStyle = window.getComputedStyle(dialog, null); | 24 computedStyle = window.getComputedStyle(dialog, null); |
| 25 | 25 |
| 26 shouldBe("computedStyle.getPropertyValue('display')", "'none'"); | 26 shouldBe("computedStyle.getPropertyValue('display')", "'none'"); |
| 27 shouldThrow('dialog.close();', "'Error: InvalidStateError: DOM Exception 11'"); | 27 shouldThrow('dialog.close();', "'InvalidStateError: An attempt was made to use a
n object that is not, or is no longer, usable.'"); |
| 28 </script> | 28 </script> |
| 29 <script src="../../js/resources/js-test-post.js"></script> | 29 <script src="../../js/resources/js-test-post.js"></script> |
| 30 </body> | 30 </body> |
| 31 </html> | 31 </html> |
| OLD | NEW |