1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/tests/mochitest/notification/test_bug931307.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,31 @@ 1.4 +<!-- 1.5 + Any copyright is dedicated to the Public Domain. 1.6 + http://creativecommons.org/publicdomain/zero/1.0/ 1.7 +--> 1.8 +<html> 1.9 +<head> 1.10 + <title>Bug 931307</title> 1.11 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.13 +</head> 1.14 +<body> 1.15 +<pre id="test"> 1.16 +<script type="application/javascript"><!-- 1.17 + 1.18 +SimpleTest.waitForExplicitFinish(); 1.19 +new Notification(""); 1.20 +var promise = Notification.get(); 1.21 +promise.then( 1.22 + function onSuccess() { 1.23 + ok(true, "No crash!"); 1.24 + SimpleTest.finish(); 1.25 + }, 1.26 + function onFailure() { 1.27 + ok(false, "Should not get an error in promise callback"); 1.28 + } 1.29 +); 1.30 + 1.31 +</script> 1.32 +</pre> 1.33 +</body> 1.34 +</html>