2013-10-30 12:41:07 -07:00
|
|
|
<!--
|
|
|
|
Any copyright is dedicated to the Public Domain.
|
|
|
|
http://creativecommons.org/publicdomain/zero/1.0/
|
|
|
|
-->
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Bug 931307</title>
|
|
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<pre id="test">
|
|
|
|
<script type="application/javascript"><!--
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
2014-05-08 14:16:00 -07:00
|
|
|
var notification = new Notification("");
|
2013-10-30 12:41:07 -07:00
|
|
|
var promise = Notification.get();
|
|
|
|
promise.then(
|
|
|
|
function onSuccess() {
|
|
|
|
ok(true, "No crash!");
|
2014-05-08 14:16:00 -07:00
|
|
|
notification.close();
|
2013-10-30 12:41:07 -07:00
|
|
|
SimpleTest.finish();
|
|
|
|
},
|
|
|
|
function onFailure() {
|
|
|
|
ok(false, "Should not get an error in promise callback");
|
2014-05-08 14:16:00 -07:00
|
|
|
notification.close();
|
2013-10-30 12:41:07 -07:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|