summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qmltests/data/geolocation.html
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qmltests/data/geolocation.html')
-rw-r--r--tests/auto/quick/qmltests/data/geolocation.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/auto/quick/qmltests/data/geolocation.html b/tests/auto/quick/qmltests/data/geolocation.html
new file mode 100644
index 000000000..c095a6b9e
--- /dev/null
+++ b/tests/auto/quick/qmltests/data/geolocation.html
@@ -0,0 +1,26 @@
+<html>
+<head>
+<title>Geolocation Permission API Test</title>
+<script>
+
+function successHandler(location) {
+ var message = document.getElementById("message");
+ message.innerHTML = "Latitude: " + location.coords.latitude +
+ "<br>Longitude: " + location.coords.longitude;
+
+}
+
+function errorHandler(error) {
+ console.error(error.message);
+}
+
+<!-- One shot example -->
+navigator.geolocation.getCurrentPosition(successHandler, errorHandler);
+
+</script>
+</head>
+<body>
+<div id="message">Location unknown</div>
+</body>
+</html>
+