blob: 37ebeca885ff5df0447b18fdbf58cc4222c33ac9 [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8" />
<title>Geolocation Test: clearWatch TypeError tests</title>
<link rel="help" href="http://www.w3.org/TR/geolocation-API/#clear-watch" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
for (const invalidId of [NaN, -1, 0, 1, 2147483648, Infinity, -Infinity]) {
test(() => {
navigator.geolocation.clearWatch(invalidId);
}, `Test that calling clearWatch with invalid watch ID (${invalidId}) does not cause an exception`);
}
</script>