From f2d58a70460bd3f8a39a28edf7295e70b6a9ba10 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marcos=20C=C3=A1ceres?= Date: Wed, 7 Dec 2022 13:57:09 +0000 Subject: [PATCH] Bug 1802367 [wpt PR 37120] - geolocation-API: Feature-Policy is now Permissions-Policy, a=testonly Automatic update from web-platform-tests geolocation-API: Feature-Policy is now Permissions-Policy (#37120) -- wpt-commits: 5bdff978e0eb2c2af1f142c8b51592eea151b492 wpt-pr: 37120 --- ...sabled-by-feature-policy.https.sub.html.headers | 1 - ... disabled-by-permissions-policy.https.sub.html} | 12 +++++------ ...ed-by-permissions-policy.https.sub.html.headers | 1 + ...nabled-by-feature-policy.https.sub.html.headers | 1 - ...licy-attribute-redirect-on-load.https.sub.html} | 14 ++++++------- ...-by-permission-policy-attribute.https.sub.html} | 10 ++++----- ...> enabled-by-permissions-policy.https.sub.html} | 20 +++++++----------- ...ed-by-permissions-policy.https.sub.html.headers | 1 + ...origin-by-feature-policy.https.sub.html.headers | 1 - ...lf-origin-by-permissions-policy.https.sub.html} | 24 +++++++++------------- ...in-by-permissions-policy.https.sub.html.headers | 1 + .../getCurrentPosition_permission_allow.https.html | 5 ++++- .../resources/permissions-policy-geolocation.html} | 6 ++++-- 13 files changed, 46 insertions(+), 51 deletions(-) delete mode 100644 testing/web-platform/tests/geolocation-API/disabled-by-feature-policy.https.sub.html.headers rename testing/web-platform/tests/geolocation-API/{disabled-by-feature-policy.https.sub.html => disabled-by-permissions-policy.https.sub.html} (79%) create mode 100644 testing/web-platform/tests/geolocation-API/disabled-by-permissions-policy.https.sub.html.headers delete mode 100644 testing/web-platform/tests/geolocation-API/enabled-by-feature-policy.https.sub.html.headers rename testing/web-platform/tests/geolocation-API/{enabled-by-feature-policy-attribute-redirect-on-load.https.sub.html => enabled-by-permission-policy-attribute-redirect-on-load.https.sub.html} (53%) rename testing/web-platform/tests/geolocation-API/{enabled-by-feature-policy-attribute.https.sub.html => enabled-by-permission-policy-attribute.https.sub.html} (56%) rename testing/web-platform/tests/geolocation-API/{enabled-by-feature-policy.https.sub.html => enabled-by-permissions-policy.https.sub.html} (63%) create mode 100644 testing/web-platform/tests/geolocation-API/enabled-by-permissions-policy.https.sub.html.headers delete mode 100644 testing/web-platform/tests/geolocation-API/enabled-on-self-origin-by-feature-policy.https.sub.html.headers rename testing/web-platform/tests/geolocation-API/{enabled-on-self-origin-by-feature-policy.https.sub.html => enabled-on-self-origin-by-permissions-policy.https.sub.html} (51%) create mode 100644 testing/web-platform/tests/geolocation-API/enabled-on-self-origin-by-permissions-policy.https.sub.html.headers rename testing/web-platform/tests/{feature-policy/resources/feature-policy-geolocation.html => permissions-policy/resources/permissions-policy-geolocation.html} (72%) diff --git a/testing/web-platform/tests/geolocation-API/disabled-by-feature-policy.https.sub.html.headers b/testing/web-platform/tests/geolocation-API/disabled-by-feature-policy.https.sub.html.headers deleted file mode 100644 index 7e75481ea6d7..000000000000 --- a/testing/web-platform/tests/geolocation-API/disabled-by-feature-policy.https.sub.html.headers +++ /dev/null @@ -1 +0,0 @@ -Feature-Policy: geolocation 'none' diff --git a/testing/web-platform/tests/geolocation-API/disabled-by-feature-policy.https.sub.html b/testing/web-platform/tests/geolocation-API/disabled-by-permissions-policy.https.sub.html similarity index 79% rename from testing/web-platform/tests/geolocation-API/disabled-by-feature-policy.https.sub.html rename to testing/web-platform/tests/geolocation-API/disabled-by-permissions-policy.https.sub.html index 26fa7218a6d3..9b603982b99a 100644 --- a/testing/web-platform/tests/geolocation-API/disabled-by-feature-policy.https.sub.html +++ b/testing/web-platform/tests/geolocation-API/disabled-by-permissions-policy.https.sub.html @@ -5,14 +5,14 @@ - + diff --git a/testing/web-platform/tests/geolocation-API/disabled-by-permissions-policy.https.sub.html.headers b/testing/web-platform/tests/geolocation-API/disabled-by-permissions-policy.https.sub.html.headers new file mode 100644 index 000000000000..26bfbc249648 --- /dev/null +++ b/testing/web-platform/tests/geolocation-API/disabled-by-permissions-policy.https.sub.html.headers @@ -0,0 +1 @@ +Permissions-Policy: geolocation=() diff --git a/testing/web-platform/tests/geolocation-API/enabled-by-feature-policy.https.sub.html.headers b/testing/web-platform/tests/geolocation-API/enabled-by-feature-policy.https.sub.html.headers deleted file mode 100644 index 40e9bc16ff98..000000000000 --- a/testing/web-platform/tests/geolocation-API/enabled-by-feature-policy.https.sub.html.headers +++ /dev/null @@ -1 +0,0 @@ -Feature-Policy: geolocation * diff --git a/testing/web-platform/tests/geolocation-API/enabled-by-feature-policy-attribute-redirect-on-load.https.sub.html b/testing/web-platform/tests/geolocation-API/enabled-by-permission-policy-attribute-redirect-on-load.https.sub.html similarity index 53% rename from testing/web-platform/tests/geolocation-API/enabled-by-feature-policy-attribute-redirect-on-load.https.sub.html rename to testing/web-platform/tests/geolocation-API/enabled-by-permission-policy-attribute-redirect-on-load.https.sub.html index 30de411cb7a3..864fb5e76139 100644 --- a/testing/web-platform/tests/geolocation-API/enabled-by-feature-policy-attribute-redirect-on-load.https.sub.html +++ b/testing/web-platform/tests/geolocation-API/enabled-by-permission-policy-attribute-redirect-on-load.https.sub.html @@ -2,15 +2,15 @@ - + diff --git a/testing/web-platform/tests/geolocation-API/enabled-by-feature-policy-attribute.https.sub.html b/testing/web-platform/tests/geolocation-API/enabled-by-permission-policy-attribute.https.sub.html similarity index 56% rename from testing/web-platform/tests/geolocation-API/enabled-by-feature-policy-attribute.https.sub.html rename to testing/web-platform/tests/geolocation-API/enabled-by-permission-policy-attribute.https.sub.html index 49a6d777d66f..018409b82902 100644 --- a/testing/web-platform/tests/geolocation-API/enabled-by-feature-policy-attribute.https.sub.html +++ b/testing/web-platform/tests/geolocation-API/enabled-by-permission-policy-attribute.https.sub.html @@ -2,14 +2,14 @@ - + diff --git a/testing/web-platform/tests/geolocation-API/enabled-by-feature-policy.https.sub.html b/testing/web-platform/tests/geolocation-API/enabled-by-permissions-policy.https.sub.html similarity index 63% rename from testing/web-platform/tests/geolocation-API/enabled-by-feature-policy.https.sub.html rename to testing/web-platform/tests/geolocation-API/enabled-by-permissions-policy.https.sub.html index 955ed10632e8..007f79ab9c42 100644 --- a/testing/web-platform/tests/geolocation-API/enabled-by-feature-policy.https.sub.html +++ b/testing/web-platform/tests/geolocation-API/enabled-by-permissions-policy.https.sub.html @@ -5,21 +5,15 @@ - + diff --git a/testing/web-platform/tests/geolocation-API/enabled-by-permissions-policy.https.sub.html.headers b/testing/web-platform/tests/geolocation-API/enabled-by-permissions-policy.https.sub.html.headers new file mode 100644 index 000000000000..774f4819e9b6 --- /dev/null +++ b/testing/web-platform/tests/geolocation-API/enabled-by-permissions-policy.https.sub.html.headers @@ -0,0 +1 @@ +Permissions-Policy: geolocation=* diff --git a/testing/web-platform/tests/geolocation-API/enabled-on-self-origin-by-feature-policy.https.sub.html.headers b/testing/web-platform/tests/geolocation-API/enabled-on-self-origin-by-feature-policy.https.sub.html.headers deleted file mode 100644 index b83264eee764..000000000000 --- a/testing/web-platform/tests/geolocation-API/enabled-on-self-origin-by-feature-policy.https.sub.html.headers +++ /dev/null @@ -1 +0,0 @@ -Feature-Policy: geolocation 'self' diff --git a/testing/web-platform/tests/geolocation-API/enabled-on-self-origin-by-feature-policy.https.sub.html b/testing/web-platform/tests/geolocation-API/enabled-on-self-origin-by-permissions-policy.https.sub.html similarity index 51% rename from testing/web-platform/tests/geolocation-API/enabled-on-self-origin-by-feature-policy.https.sub.html rename to testing/web-platform/tests/geolocation-API/enabled-on-self-origin-by-permissions-policy.https.sub.html index 12ff86fa4e55..d879c1c5432b 100644 --- a/testing/web-platform/tests/geolocation-API/enabled-on-self-origin-by-feature-policy.https.sub.html +++ b/testing/web-platform/tests/geolocation-API/enabled-on-self-origin-by-permissions-policy.https.sub.html @@ -4,26 +4,22 @@ - + diff --git a/testing/web-platform/tests/geolocation-API/enabled-on-self-origin-by-permissions-policy.https.sub.html.headers b/testing/web-platform/tests/geolocation-API/enabled-on-self-origin-by-permissions-policy.https.sub.html.headers new file mode 100644 index 000000000000..9fa0a4ac9a8a --- /dev/null +++ b/testing/web-platform/tests/geolocation-API/enabled-on-self-origin-by-permissions-policy.https.sub.html.headers @@ -0,0 +1 @@ +Permissions-Policy: geolocation=(self) diff --git a/testing/web-platform/tests/geolocation-API/getCurrentPosition_permission_allow.https.html b/testing/web-platform/tests/geolocation-API/getCurrentPosition_permission_allow.https.html index 102b8b4d11ea..c7fa970e086f 100644 --- a/testing/web-platform/tests/geolocation-API/getCurrentPosition_permission_allow.https.html +++ b/testing/web-platform/tests/geolocation-API/getCurrentPosition_permission_allow.https.html @@ -19,7 +19,10 @@ let calledAsync = false; navigator.geolocation.getCurrentPosition( t.step_func((position) => { - assert_true(calledAsync, "Expected callback to be called asynchronously") + assert_true( + calledAsync, + "Expected callback to be called asynchronously" + ); resolve(position); }), reject diff --git a/testing/web-platform/tests/feature-policy/resources/feature-policy-geolocation.html b/testing/web-platform/tests/permissions-policy/resources/permissions-policy-geolocation.html similarity index 72% rename from testing/web-platform/tests/feature-policy/resources/feature-policy-geolocation.html rename to testing/web-platform/tests/permissions-policy/resources/permissions-policy-geolocation.html index 81943845447e..c9ae680ff2d2 100644 --- a/testing/web-platform/tests/feature-policy/resources/feature-policy-geolocation.html +++ b/testing/web-platform/tests/permissions-policy/resources/permissions-policy-geolocation.html @@ -4,18 +4,20 @@ "use strict"; Promise.resolve().then(async () => { + test_driver.set_test_context(window.parent); await test_driver.set_permission( { name: "geolocation" }, "granted", false ); + let enabled = true; try { await new Promise((resolve, reject) => { navigator.geolocation.getCurrentPosition(resolve, reject); }); - window.parent.postMessage({ enabled: true }, "*"); } catch (e) { - window.parent.postMessage({ enabled: false }, "*"); + enabled = false; } + window.parent.postMessage({ type: "availability-result", enabled }, "*"); }); -- 2.11.4.GIT