Home | History | Annotate | Download | only in script-tests
      1 description("Tests for a crash when clearWatch() is called with a zero ID.<br><br>We call clearWatch() with a request in progress then navigate the page. This accesses the watchers map during cleanup and triggers the crash. This page should not be visible when the test completes.");
      2 
      3 if (window.layoutTestController) {
      4     layoutTestController.setGeolocationPermission(true);
      5     layoutTestController.setMockGeolocationPosition(51.478, -0.166, 100);
      6 } else
      7     debug('This test can not be run without the LayoutTestController');
      8 
      9 document.body.onload = function() {
     10     navigator.geolocation.watchPosition(function() {});
     11     navigator.geolocation.clearWatch(0);
     12     location = "data:text/html,TEST COMPLETE<script>if(window.layoutTestController) layoutTestController.notifyDone();</script>";
     13 }
     14 
     15 window.jsTestIsAsync = true;
     16 window.successfullyParsed = true;
     17