| 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 showModal() performs the steps specified in the HTML spe
c. bug 97425"); | 9 description("Tests that showModal() performs the steps specified in the HTML spe
c. bug 97425"); |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 debug('"If dialog is not in a Document, then throw an InvalidStateError exceptio
n."'); | 26 debug('"If dialog is not in a Document, then throw an InvalidStateError exceptio
n."'); |
| 27 shouldThrow('dialog.showModal();', "'InvalidStateError: An attempt was made to u
se an object that is not, or is no longer, usable.'"); | 27 shouldThrow('dialog.showModal();', "'InvalidStateError: An attempt was made to u
se an object that is not, or is no longer, usable.'"); |
| 28 | 28 |
| 29 doc = document.implementation.createHTMLDocument(); | 29 doc = document.implementation.createHTMLDocument(); |
| 30 doc.body.appendChild(dialog); | 30 doc.body.appendChild(dialog); |
| 31 shouldBeFalse("dialog.open"); | 31 shouldBeFalse("dialog.open"); |
| 32 dialog.showModal(); | 32 dialog.showModal(); |
| 33 debug('Although the document is not attached to any pages, showModal() should ex
ecute as normal.'); | 33 debug('Although the document is not attached to any pages, showModal() should ex
ecute as normal.'); |
| 34 shouldBeTrue("dialog.open"); | 34 shouldBeTrue("dialog.open"); |
| 35 </script> | 35 </script> |
| 36 <script src="../../js/resources/js-test-post.js"></script> | |
| 37 </body> | 36 </body> |
| 38 </html> | 37 </html> |
| OLD | NEW |