Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Geolocation / script-tests / clear-watch-invalid-id-crash.js
blob13fc8f44d69ea15e2bfa626aebe7e9677787dcce
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.");
3 if (!window.testRunner || !window.internals)
4 debug('This test can not run without testRunner or internals');
6 internals.setGeolocationClientMock(document);
7 internals.setGeolocationPermission(document, true);
8 internals.setGeolocationPosition(document, 51.478, -0.166, 100);
10 document.body.onload = function() {
11 navigator.geolocation.watchPosition(function() {});
12 navigator.geolocation.clearWatch(0);
13 location = "data:text/html,TEST COMPLETE<script>if(window.testRunner) testRunner.notifyDone();</script>";
16 window.jsTestIsAsync = true;