mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
38 lines
1.1 KiB
HTML
38 lines
1.1 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Test Permitted Application for Alarm API</title>
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
</head>
|
|
<body>
|
|
<p id="display"></p>
|
|
<div id="content" style="display: none"></div>
|
|
<pre id="test">
|
|
<script type="application/javascript">
|
|
|
|
"use strict";
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
SpecialPowers.pushPrefEnv({"set": [["dom.mozAlarms.enabled", true]]}, function() {
|
|
SpecialPowers.addPermission("alarms", true, document);
|
|
|
|
// mozAlarms is intalled on all platforms except Android for the moment.
|
|
if (navigator.appVersion.indexOf("Android") != -1) {
|
|
ok(!('mozAlarms' in navigator), "navigator.mozAlarms should not exist");
|
|
} else {
|
|
ok('mozAlarms' in navigator, "navigator.mozAlarms should exist");
|
|
ok(navigator.mozAlarms, "navigator.mozAlarms should return an object");
|
|
ok(navigator.mozAlarms instanceof SpecialPowers.Ci.nsIDOMMozAlarmsManager,
|
|
"navigator.mozAlarms should be an nsIDOMMozAlarmsManager object");
|
|
}
|
|
|
|
SimpleTest.finish();
|
|
});
|
|
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|