Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /geolocation/clearWatch_TypeError.https.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8" />
<title>Geolocation Test: clearWatch TypeError tests</title>
<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>