1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/tests/mochitest/notification/desktop-notification/test_leak_windowClose.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,34 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=605309 1.8 +--> 1.9 +<head> 1.10 + <title>Test for leak when window closes</title> 1.11 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <script type="text/javascript" src="notification_common.js"></script> 1.13 +<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.14 + 1.15 +<script> 1.16 +if (is_feature_enabled()) { 1.17 + SimpleTest.waitForExplicitFinish(); 1.18 + 1.19 + function boom() 1.20 + { 1.21 + document.documentElement.focus(); 1.22 + var x = navigator.mozNotification; 1.23 + document.documentElement.addEventListener('', function(){x}, false); 1.24 + ok(true, "load callback called"); 1.25 + SimpleTest.finish(); 1.26 + } 1.27 + 1.28 + window.addEventListener("load", boom, false); 1.29 +} else { 1.30 + ok(true, "Desktop notifications not enabled."); 1.31 +} 1.32 +</script> 1.33 +</head> 1.34 +<body> 1.35 +<p> I like to write tests </p> 1.36 +</body> 1.37 +</html>