Home | History | Annotate | Download | only in resources
      1 description("Tests that when timeout is zero (and maximumAge is too), the error callback is called immediately with code TIMEOUT.");
      2 
      3 layoutTestController.setMockGeolocationPosition(51.478, -0.166, 100.0);
      4 
      5 var error;
      6 navigator.geolocation.getCurrentPosition(function(p) {
      7     testFailed('Success callback invoked unexpectedly');
      8     window.layoutTestController.notifyDone();
      9 }, function(e) {
     10     error = e
     11     shouldBe('error.code', 'error.TIMEOUT');
     12     shouldBe('error.message', '"Timeout expired"');
     13     debug('<br /><span class="pass">TEST COMPLETE</span>');
     14     window.layoutTestController.notifyDone();
     15 }, {
     16     timeout: 0
     17 });
     18 window.layoutTestController.waitUntilDone();
     19 
     20 var isAsynchronous = true;
     21 var successfullyParsed = true;
     22