chromium/third_party/blink/web_tests/http/tests/geolocation-api/geolocation-default-feature-policy.https.sub.window.js

//META: script=/resources/testharness.js
//META: script=/resources/testharnessreport.js
//META: script=../resources/feature-policy-permissions-test.js

import {GeolocationMock} from '/resources/geolocation-mock.js';

const mockLatitude = 51.478;
const mockLongitude = -0.166;
const mockAccuracy = 100.0;

const mock = new GeolocationMock();
mock.setGeolocationPermission(true);
mock.setGeolocationPosition(mockLatitude, mockLongitude, mockAccuracy);

run_permission_default_header_policy_tests(
  location.protocol + '//localhost:' + location.port,
  'geolocation',
  'geolocation',
  'GeolocationPositionError',
  function() { return new Promise((resolve, reject) => {
    navigator.geolocation.getCurrentPosition(resolve, reject); }); });