dom/tests/mochitest/geolocation/test_manyWatchSerial.html

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=482260
     5 -->
     6 <head>
     7   <title>Test for watchPosition </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=482260">Mozilla Bug 482260</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(true, test1);
    26 });
    28 var watchID = 0;
    29 var completeCount = 10;
    32 function successCallback(position) {
    34   navigator.geolocation.clearWatch(watchID);
    36   completeCount--;
    38   if (completeCount==0) {
    39     ok(1, "all watchPosition successCallbacks called");
    40     SimpleTest.finish();
    41     return;
    42   }
    44   watchID = navigator.geolocation.watchPosition(successCallback);
    45 }
    47 function test1() {
    48   watchID = navigator.geolocation.watchPosition(successCallback);
    49 }
    50 </script>
    51 </pre>
    52 </body>
    53 </html>

mercurial