Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / notifications / resources / close-event-test.js
blob672458a111158db44ed48b134e8c83ce68544d22
1 if (self.importScripts) {
2 importScripts('/resources/testharness.js');
3 importScripts('worker-helpers.js');
6 async_test(function(test) {
7 if (Notification.permission != 'granted') {
8 assert_unreached('No permission has been granted for displaying notifications.');
9 return;
12 var notification = new Notification('My Notification');
13 notification.addEventListener('show', function() {
14 notification.close();
15 });
17 notification.addEventListener('close', function() {
18 test.done();
19 });
21 notification.addEventListener('error', function() {
22 assert_unreached('The error event should not be thrown.');
23 });
25 }, 'Closing a notification should fire the onclose() event.');
27 if (isDedicatedOrSharedWorker())
28 done();