OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <dialog></dialog> | 7 <dialog></dialog> |
8 <script> | 8 <script> |
9 description("Test that dialog receives a close event upon closing."); | 9 description("Test that dialog receives a close event upon closing."); |
10 jsTestIsAsync = true; | 10 jsTestIsAsync = true; |
11 | 11 |
12 document.addEventListener('close', function(event) { | 12 document.addEventListener('close', function(event) { |
13 testFailed("The 'close' event unexpectedly bubbled."); | 13 testFailed("The 'close' event unexpectedly bubbled."); |
14 }); | 14 }); |
(...skipping 22 matching lines...) Expand all Loading... |
37 dialog.close(); | 37 dialog.close(); |
38 | 38 |
39 // Verify that preventDefault() didn't cancel closing. | 39 // Verify that preventDefault() didn't cancel closing. |
40 shouldBeFalse('dialog.open'); | 40 shouldBeFalse('dialog.open'); |
41 | 41 |
42 // dialog's close event handler shouldn't be called synchronously. | 42 // dialog's close event handler shouldn't be called synchronously. |
43 shouldBe('closedCount', '0'); | 43 shouldBe('closedCount', '0'); |
44 </script> | 44 </script> |
45 </body> | 45 </body> |
46 </html> | 46 </html> |
OLD | NEW |