Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=573588
5 -->
6 <head>
7 <title>Basic functional test</title>
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <script type="text/javascript" src="notification_common.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=573588">Basic property tests</a>
14 <p id="display"></p>
15 <div id="content" style="display: none">
16 </div>
17 <pre id="test">
18 </pre>
19 <script type="text/javascript">
20 if (is_feature_enabled()) {
21 SimpleTest.waitForExplicitFinish();
23 function showNotifications() {
24 ok(navigator.mozNotification, "test for notification.");
26 var notification = navigator.mozNotification.createNotification("test", "test");
27 ok(notification, "test to ensure we can create a notification");
29 notification.onclose = function() {
30 ok(true, "notification was display and is now closing");
31 reset_notifications();
32 SimpleTest.finish();
33 };
35 notification.onclick = function() {
36 ok(false, "Click should not have been called.");
37 reset_notifications();
38 SimpleTest.finish();
39 };
41 notification.show();
42 }
44 setup_notifications(true, false, showNotifications);
45 } else {
46 ok(true, "Desktop notifications not enabled.");
47 }
48 </script>
49 </body>
50 </html>