dom/tests/mochitest/notification/desktop-notification/test_leak_windowClose.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=605309
     5 -->
     6 <head>
     7   <title>Test for leak when window closes</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" />
    12 <script>
    13 if (is_feature_enabled()) {
    14     SimpleTest.waitForExplicitFinish();
    16     function boom()
    17     {
    18         document.documentElement.focus();
    19         var x = navigator.mozNotification;
    20         document.documentElement.addEventListener('', function(){x}, false);
    21         ok(true, "load callback called");
    22         SimpleTest.finish();
    23     }
    25     window.addEventListener("load", boom, false);
    26 } else {
    27     ok(true, "Desktop notifications not enabled.");
    28 }
    29 </script>
    30 </head>
    31 <body>
    32 <p> I like to write tests </p>
    33 </body>
    34 </html>

mercurial