diff options
Diffstat (limited to 'LayoutTests/fast/dom/Geolocation/script-tests/enabled.js')
-rw-r--r-- | LayoutTests/fast/dom/Geolocation/script-tests/enabled.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/Geolocation/script-tests/enabled.js b/LayoutTests/fast/dom/Geolocation/script-tests/enabled.js new file mode 100644 index 0000000..6cb7bad --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/script-tests/enabled.js @@ -0,0 +1,18 @@ +description("Tests that the navigator.geolocation object is present."); + +function hasGeolocationProperty() +{ + for (var property in navigator) { + if (property == "geolocation") + return true; + } + return false; +} + +shouldBeTrue("typeof navigator.geolocation == 'object'"); +shouldBeTrue("hasGeolocationProperty()"); +shouldBeTrue("'geolocation' in navigator"); +shouldBeTrue("navigator.hasOwnProperty('geolocation')"); + +window.jsTestIsAsync = false; +window.successfullyParsed = true; |