blob: faeabe8a0c646a403bcb8657fb85a00719277349 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../js/resources/js-test-pre.js"></script>
<script>
if (window.internals)
internals.settings.setDialogElementEnabled(true);
</script>
</head>
<body>
<dialog id="mydialog">It's my dialog.</dialog>
<script>
description("Tests that dialog is visible after show() is called and not visible after close() is called. bug 90931");
dialog = document.getElementById('mydialog');
computedStyle = window.getComputedStyle(dialog, null);
shouldBe("computedStyle.getPropertyValue('display')", "'none'");
dialog.show();
computedStyle = window.getComputedStyle(dialog, null);
shouldBe("computedStyle.getPropertyValue('display')", "'block'");
dialog.close();
computedStyle = window.getComputedStyle(dialog, null);
shouldBe("computedStyle.getPropertyValue('display')", "'none'");
shouldThrow('dialog.close();', "'Error: INVALID_STATE_ERR: DOM Exception 11'");
</script>
<script src="../../js/resources/js-test-post.js"></script>
</body>
</html>