2008-09-05 03:31:09 +04:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<!--
|
2009-03-15 07:03:21 +03:00
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=478911
|
2008-09-05 03:31:09 +04:00
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<title>Test for watchPosition </title>
|
2009-05-07 00:46:04 +04:00
|
|
|
<script type="text/javascript" src="/MochiKit/packed.js"></script>
|
2008-09-05 03:31:09 +04:00
|
|
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<script type="text/javascript" src="geolocation_common.js"></script>
|
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
|
|
</head>
|
|
|
|
<body>
|
2009-03-15 07:03:21 +03:00
|
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=478911">Mozilla Bug 478911</a>
|
2008-09-05 03:31:09 +04:00
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<pre id="test">
|
|
|
|
<script class="testbody" type="text/javascript">
|
|
|
|
|
2010-08-31 20:15:52 +04:00
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
resume_geolocationProvider();
|
|
|
|
force_prompt(false);
|
|
|
|
|
2009-03-15 07:03:21 +03:00
|
|
|
var watchID;
|
2008-09-05 03:31:09 +04:00
|
|
|
|
2009-03-15 07:03:21 +03:00
|
|
|
function failureCallback(error) {
|
|
|
|
ok(error.code == error.PERMISSION_DENIED, "Ensure that the error was PERMISSION_DENIED");
|
2010-08-31 20:15:52 +04:00
|
|
|
reset_prompt();
|
2008-11-13 01:52:56 +03:00
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
2009-03-15 07:03:21 +03:00
|
|
|
function successCallback(position){
|
|
|
|
ok(0, "Success was called when it shouldn't have been. major problem");
|
2010-08-31 20:15:52 +04:00
|
|
|
reset_prompt();
|
2008-09-05 03:31:09 +04:00
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
2009-08-15 03:12:09 +04:00
|
|
|
watchID = navigator.geolocation.watchPosition(successCallback, failureCallback, null);
|
2008-09-05 03:31:09 +04:00
|
|
|
|
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|