4 <title>Notifications: Closing a notification in the
"unload" event does not crash.
</title>
5 <script src=
"../resources/testharness.js"></script>
6 <script src=
"../resources/testharnessreport.js"></script>
7 <script src=
"resources/test-helpers.js"></script>
11 // Tests that closing a displayed Web Notification in the unload event does not
12 // cause the browser to crash.
13 if (window
.testRunner
) {
14 testRunner
.setPermission('notifications', 'granted', location
.origin
, location
.origin
);
15 testRunner
.setCanOpenWindows();
18 async_test(function (test
) {
19 var win
= window
.open('resources/window-close-in-unload-event.html');
20 window
.addEventListener('message', function (event
) {
21 if (event
.data
== 'opened') {
23 } else if (event
.data
== 'closed') {
28 }, 'Closing a notification in the "unload" event does not crash.');