diff options
Diffstat (limited to 'testing/web-platform/tests/fenced-frame/resources/permission-geolocation-test-runner.html')
-rw-r--r-- | testing/web-platform/tests/fenced-frame/resources/permission-geolocation-test-runner.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/web-platform/tests/fenced-frame/resources/permission-geolocation-test-runner.html b/testing/web-platform/tests/fenced-frame/resources/permission-geolocation-test-runner.html new file mode 100644 index 0000000000..724a35ce9a --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/permission-geolocation-test-runner.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<title>Fenced frame content to report the result of navigator.geolocation.getCurrentPosition()</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="utils.js"></script> + +<body> +<script> + +window.runTest = async (fenced_frame_url) => { + const [permission_geolocation_key] = parseKeylist(); + await test_driver.set_permission({name: 'geolocation'}, 'granted', true); + + attachFencedFrame(generateURL(fenced_frame_url, [permission_geolocation_key])); + const actual_result = await nextValueFromServer(permission_geolocation_key); + + assert_equals( + actual_result, 'result: denied', + 'geolocation permission is not permitted for fenced frames.'); +}; +</script> +</body> |