2008-09-04 16:31:09 -07:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<!--
|
2009-03-14 21:03:21 -07:00
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=478911
|
2008-09-04 16:31:09 -07:00
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<title>Test for getCurrentPosition </title>
|
2009-05-06 13:46:04 -07:00
|
|
|
<script type="text/javascript" src="/MochiKit/packed.js"></script>
|
2008-09-04 16:31:09 -07: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-14 21:03:21 -07:00
|
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=478911">Mozilla Bug 478911</a>
|
2008-09-04 16:31:09 -07:00
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<pre id="test">
|
|
|
|
<script class="testbody" type="text/javascript">
|
|
|
|
|
2009-03-14 21:03:21 -07:00
|
|
|
function failureCallback(error) {
|
|
|
|
ok(error.code == error.PERMISSION_DENIED, "Ensure that the error was PERMISSION_DENIED");
|
2008-11-12 14:52:56 -08:00
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
2009-03-14 21:03:21 -07:00
|
|
|
function successCallback(position){
|
|
|
|
ok(0, "Success was called when it shouldn't have been. major problem");
|
2008-09-04 16:31:09 -07:00
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Test for Bug **/
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
|
2009-03-14 21:03:21 -07:00
|
|
|
navigator.geolocation.getCurrentPosition(successCallback, failureCallback, null);
|
2008-09-04 16:31:09 -07:00
|
|
|
|
2009-03-14 21:03:21 -07:00
|
|
|
// click deny
|
2009-03-31 09:35:55 -07:00
|
|
|
setTimeout(clickNotificationButton, 50, kDenyButton);
|
2008-09-04 16:31:09 -07:00
|
|
|
|
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|