mirror of
https://github.com/servo/servo.git
synced 2025-08-26 07:38:21 +01:00
Update web-platform-tests to revision b'4435c35d9085ed2be61e64d0093b8e1b0e7a877b'
This commit is contained in:
parent
901b76297d
commit
4031d79cea
383 changed files with 8858 additions and 2734 deletions
|
@ -1 +0,0 @@
|
|||
Feature-Policy: geolocation 'none'
|
|
@ -5,14 +5,14 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="/feature-policy/resources/featurepolicy.js"></script>
|
||||
<script src="/permissions-policy/resources/permissions-policy.js"></script>
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
const same_origin_src =
|
||||
"/feature-policy/resources/feature-policy-geolocation.html";
|
||||
"/permissions-policy/resources/permissions-policy-geolocation.html";
|
||||
const cross_origin_src =
|
||||
"https://{{domains[www]}}:{{ports[https][0]}}" + same_origin_src;
|
||||
"https://{{hosts[][]}}:{{ports[https][0]}}" + same_origin_src;
|
||||
|
||||
promise_test(async (t) => {
|
||||
await test_driver.set_permission(
|
||||
|
@ -48,7 +48,7 @@
|
|||
GeolocationPositionError.prototype.PERMISSION_DENIED,
|
||||
"Expected PERMISSION_DENIED"
|
||||
);
|
||||
}, "Feature-Policy header geolocation : 'none' disallows the top-level document.");
|
||||
}, "Permissions-Policy header geolocation=() disallows the top-level document.");
|
||||
|
||||
async_test((t) => {
|
||||
test_feature_availability(
|
||||
|
@ -57,7 +57,7 @@
|
|||
same_origin_src,
|
||||
expect_feature_unavailable_default
|
||||
);
|
||||
}, "Feature-Policy header geolocation : 'none' disallows same-origin iframes.");
|
||||
}, "Permissions-Policy header geolocation=() disallows same-origin iframes.");
|
||||
|
||||
async_test((t) => {
|
||||
test_feature_availability(
|
||||
|
@ -66,6 +66,6 @@
|
|||
cross_origin_src,
|
||||
expect_feature_unavailable_default
|
||||
);
|
||||
}, "Feature-Policy header geolocation 'none' disallows cross-origin iframes.");
|
||||
}, "Permissions-Policy header geolocation=() disallows cross-origin iframes.");
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1 @@
|
|||
Permissions-Policy: geolocation=()
|
|
@ -1 +0,0 @@
|
|||
Feature-Policy: geolocation *
|
|
@ -2,15 +2,15 @@
|
|||
<body>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/feature-policy/resources/featurepolicy.js"></script>
|
||||
<script src="/permissions-policy/resources/permissions-policy.js"></script>
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
const relative_path = "/feature-policy/resources/feature-policy-geolocation.html";
|
||||
const base_src = "/feature-policy/resources/redirect-on-load.html#";
|
||||
const relative_path = "/permissions-policy/resources/permissions-policy-geolocation.html";
|
||||
const base_src = "/permissions-policy/resources/redirect-on-load.html#";
|
||||
const same_origin_src = base_src + relative_path;
|
||||
const cross_origin_src =
|
||||
base_src + "https://{{domains[www]}}:{{ports[https][0]}}" + relative_path;
|
||||
`${base_src}https://{{hosts[][]}}:{{ports[https][0]}}${relative_path}`;
|
||||
|
||||
async_test(t => {
|
||||
test_feature_availability(
|
||||
|
@ -20,17 +20,17 @@
|
|||
expect_feature_available_default,
|
||||
"geolocation"
|
||||
);
|
||||
}, 'Feature-Policy allow="geolocation" allows same-origin relocation');
|
||||
}, 'Permissions-Policy allow="geolocation" allows same-origin relocation');
|
||||
|
||||
async_test(t => {
|
||||
test_feature_availability(
|
||||
'geolocation',
|
||||
t,
|
||||
cross_origin_src,
|
||||
expect_feature_unavailable_default,
|
||||
expect_feature_available_default,
|
||||
"geolocation"
|
||||
);
|
||||
}, 'Feature-Policy allow="geolocation" disallows cross-origin relocation');
|
||||
}, 'Permissions-Policy allow="geolocation" allows cross-origin relocation');
|
||||
|
||||
</script>
|
||||
</body>
|
|
@ -2,14 +2,14 @@
|
|||
<body>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/feature-policy/resources/featurepolicy.js"></script>
|
||||
<script src="/permissions-policy/resources/permissions-policy.js"></script>
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
const same_origin_src =
|
||||
"/feature-policy/resources/feature-policy-geolocation.html";
|
||||
"/permissions-policy/resources/permissions-policy-geolocation.html";
|
||||
const cross_origin_src =
|
||||
"https://{{domains[www]}}:{{ports[https][0]}}" + same_origin_src;
|
||||
"https://{{hosts[][]}}:{{ports[https][0]}}" + same_origin_src;
|
||||
|
||||
async_test(t => {
|
||||
test_feature_availability(
|
||||
|
@ -19,7 +19,7 @@
|
|||
expect_feature_available_default,
|
||||
"geolocation"
|
||||
);
|
||||
}, 'Feature policy "geolocation" can be enabled in same-origin iframe using allow="geolocation" attribute');
|
||||
}, 'Permissions policy "geolocation" can be enabled in same-origin iframe using allow="geolocation" attribute');
|
||||
|
||||
async_test(t => {
|
||||
test_feature_availability(
|
||||
|
@ -29,6 +29,6 @@
|
|||
expect_feature_available_default,
|
||||
"geolocation"
|
||||
);
|
||||
}, 'Feature policy "geolocation" can be enabled in cross-origin iframe using allow="geolocation" attribute');
|
||||
}, 'Permissions policy "geolocation" can be enabled in cross-origin iframe using allow="geolocation" attribute');
|
||||
</script>
|
||||
</body>
|
|
@ -5,21 +5,15 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="/feature-policy/resources/featurepolicy.js"></script>
|
||||
<script src="/permissions-policy/resources/permissions-policy.js"></script>
|
||||
<script>
|
||||
const same_origin_src =
|
||||
"/feature-policy/resources/feature-policy-geolocation.html";
|
||||
"/permissions-policy/resources/permissions-policy-geolocation.html";
|
||||
const cross_origin_src =
|
||||
"https://{{domains[www]}}:{{ports[https][0]}}" + same_origin_src;
|
||||
"https://{{hosts[][]}}:{{ports[https][0]}}" + same_origin_src;
|
||||
|
||||
promise_test(async (t) => {
|
||||
|
||||
await test_driver.set_permission(
|
||||
{ name: "geolocation" },
|
||||
"granted",
|
||||
false
|
||||
);
|
||||
|
||||
await test_driver.set_permission({ name: "geolocation" }, "granted");
|
||||
const result = await new Promise((resolve, reject) => {
|
||||
navigator.geolocation.getCurrentPosition(resolve, reject);
|
||||
});
|
||||
|
@ -28,7 +22,7 @@
|
|||
result instanceof GeolocationPosition,
|
||||
"Expected a GeolocationPosition"
|
||||
);
|
||||
}, "Feature-Policy header geolocation: * allows the top-level document.");
|
||||
}, "Permissions-Policy header geolocation=* allows the top-level document.");
|
||||
|
||||
async_test((t) => {
|
||||
test_feature_availability(
|
||||
|
@ -37,7 +31,7 @@
|
|||
same_origin_src,
|
||||
expect_feature_available_default
|
||||
);
|
||||
}, "Feature-Policy header geolocation: * allows same-origin iframes.");
|
||||
}, "Permissions-Policy header geolocation=* allows same-origin iframes.");
|
||||
|
||||
async_test((t) => {
|
||||
test_feature_availability(
|
||||
|
@ -46,6 +40,6 @@
|
|||
cross_origin_src,
|
||||
expect_feature_available_default
|
||||
);
|
||||
}, "Feature-Policy header geolocation: * allows cross-origin iframes.");
|
||||
}, "Permissions-Policy header geolocation=* allows cross-origin iframes.");
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1 @@
|
|||
Permissions-Policy: geolocation=*
|
|
@ -1 +0,0 @@
|
|||
Feature-Policy: geolocation 'self'
|
|
@ -4,26 +4,22 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="/feature-policy/resources/featurepolicy.js"></script>
|
||||
<script src="/permissions-policy/resources/permissions-policy.js"></script>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
const same_origin_src =
|
||||
"/feature-policy/resources/feature-policy-geolocation.html";
|
||||
"/permissions-policy/resources/permissions-policy-geolocation.html";
|
||||
const cross_origin_src =
|
||||
"https://{{domains[www]}}:{{ports[https][0]}}" + same_origin_src;
|
||||
"https://{{hosts[][]}}:{{ports[https][0]}}" + same_origin_src;
|
||||
|
||||
promise_test(async (t) => {
|
||||
await test_driver.set_permission(
|
||||
{ name: "geolocation" },
|
||||
"granted",
|
||||
false
|
||||
);
|
||||
await new Promise(resolve => {
|
||||
navigator.geolocation.getCurrentPosition(resolve);
|
||||
})
|
||||
}, 'Feature-Policy header geolocation "self" allows the top-level document.');
|
||||
await test_driver.set_permission({ name: "geolocation" }, "granted");
|
||||
await new Promise((resolve, reject) => {
|
||||
navigator.geolocation.getCurrentPosition(resolve, reject);
|
||||
});
|
||||
}, "Permissions-Policy header geolocation=(self) allows the top-level document.");
|
||||
|
||||
async_test((t) => {
|
||||
test_feature_availability(
|
||||
|
@ -32,7 +28,7 @@
|
|||
same_origin_src,
|
||||
expect_feature_available_default
|
||||
);
|
||||
}, 'Feature-Policy header geolocation "self" allows same-origin iframes.');
|
||||
}, "Permissions-Policy header geolocation=(self) allows same-origin iframes.");
|
||||
|
||||
async_test((t) => {
|
||||
test_feature_availability(
|
||||
|
@ -41,6 +37,6 @@
|
|||
cross_origin_src,
|
||||
expect_feature_unavailable_default
|
||||
);
|
||||
}, 'Feature-Policy header geolocation "self" disallows cross-origin iframes.');
|
||||
}, "Permissions-Policy header geolocation=(self) disallows cross-origin iframes.");
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1 @@
|
|||
Permissions-Policy: geolocation=(self)
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue