~zaspire/oxide/push-messaging

« back to all changes in this revision

Viewing changes to qt/tests/qmltests/api/tst_GeolocationPermissionRequest_session_persist.html

  • Committer: Chris Coulson
  • Date: 2015-06-10 22:36:42 UTC
  • mfrom: (1103.2.20 permissions)
  • Revision ID: chris.coulson@canonical.com-20150610223642-9cctvki80sb2ohuj
Persist geolocation permission request decisions for the life of WebContext

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html>
 
2
<body>
 
3
</body>
 
4
<script>
 
5
var showPosition = function(position) {
 
6
  var e = new CustomEvent("oxidegeolocationresult", { bubbles: true, detail: { status: 0 } });
 
7
  document.documentElement.dispatchEvent(e);
 
8
};
 
9
 
 
10
var handleError = function(error) {
 
11
  var e = new CustomEvent("oxidegeolocationresult", { bubbles: true, detail: { status: error.code } });
 
12
  document.documentElement.dispatchEvent(e);
 
13
};
 
14
 
 
15
navigator.geolocation.getCurrentPosition(showPosition, handleError);
 
16
</script>
 
17
</html>