Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: LayoutTests/fast/dom/HTMLDialogElement/dialog-open.html

Issue 16818023: DOMException toString is not correct (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698