2 * Copyright 2013 The Chromium Authors. All rights reserved. Use of this
3 * source code is governed by a BSD-style license that can be found in the
8 <script type="text/javascript">
9 var onGeolocationSuccess = function(position) {
10 console.log('iframe.onGeolocationSuccess');
11 window.top['onIframeGeolocationSuccess'](position);
13 var onGeolocationFailure = function(err) {
14 console.log('iframe.onGeolocationFailure');
15 window.top['onIframeGeolocationFailure']();
17 var startTest = function() {
18 console.log('iframe.startTest');
19 // Ask for a cached geolocation, we already should have fetched
20 // fresh geolocation for the top level frame (guest). Asking for fresh
21 // location from <iframe> again makes Geolocation flaky and sad (b/c of
22 // ui_test_utils::OverrideGeolocation()).
23 navigator.geolocation.getCurrentPosition(
26 // maximumAge > test timeout.
27 {maximumAge: 100000, timeout: 0});
32 <div>An <iframe> that requests geolocation.</div>
34 console.log('<iframe> loaded');