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