Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / notifications / resources / window-close-in-unload-event.html
blob4dadaddc7023a432ddd58ceecabe9511f5155424
1 <!doctype html>
2 <html>
3 <head>
4 <title>Notifications: Document for closing a notification in the "unload" event.</title>
5 </head>
6 <body>
7 <script>
8 var notification = new Notification('My Notification', {
9 body: 'Created from a window.',
10 icon: '/icon.png',
11 });
13 opener.postMessage('opened', '*');
15 window.addEventListener('unload', function() {
16 notification.close();
18 opener.postMessage('closed', '*');
19 });
20 </script>
21 </body>
22 </html>