dom/tests/mochitest/geolocation/test_cancelCurrent.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=478911
     5 -->
     6 <head>
     7   <title>Test for getCurrentPosition </title>
     8   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <script type="text/javascript" src="geolocation_common.js"></script>
    11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    12 </head>
    13 <body>
    14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=478911">Mozilla Bug 478911</a>
    15 <p id="display"></p>
    16 <div id="content" style="display: none">
    18 </div>
    19 <pre id="test">
    20 <script class="testbody" type="text/javascript">
    22 SimpleTest.waitForExplicitFinish();
    24 resume_geolocationProvider(function() {
    25   force_prompt(false, test1);
    26 });
    28 function failureCallback(error) {
    29   ok(error.code == error.PERMISSION_DENIED, "Ensure that the error was PERMISSION_DENIED");
    30   SimpleTest.finish();
    31 }
    33 function successCallback(position){
    34   ok(0, "Success was called when it shouldn't have been.  major problem");
    35   SimpleTest.finish();
    36 }
    38 function test1() {
    39   navigator.geolocation.getCurrentPosition(successCallback, failureCallback, null);
    40 }
    41 </script>
    42 </pre>
    43 </body>
    44 </html>

mercurial