mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision 81962ac8802223d038b188b6f9cb88a0a9c5beee
This commit is contained in:
parent
fe1a057bd1
commit
24183668c4
1960 changed files with 29853 additions and 10555 deletions
|
@ -17,17 +17,19 @@ const cross_origin_src =
|
|||
"https://{{domains[www]}}:{{ports[https][0]}}" + same_origin_src;
|
||||
const base_src = "/feature-policy/resources/redirect-on-load.html#";
|
||||
|
||||
function run_fp_tests_disabled(sensorType) {
|
||||
const sensorName = sensorType.name;
|
||||
function run_fp_tests_disabled(sensorName) {
|
||||
const sensorType = self[sensorName];
|
||||
const featureNameList = feature_policies[sensorName];
|
||||
const header = "Feature-Policy header " + featureNameList.join(" 'none';") + " 'none'";
|
||||
const desc = "'new " + sensorName + "()'";
|
||||
|
||||
test(() => {
|
||||
assert_true(sensorName in self);
|
||||
assert_throws("SecurityError", () => {new sensorType()});
|
||||
}, `${sensorName}: ${header} disallows the top-level document.`);
|
||||
|
||||
async_test(t => {
|
||||
assert_true(sensorName in self);
|
||||
test_feature_availability(
|
||||
desc,
|
||||
t,
|
||||
|
@ -37,6 +39,7 @@ function run_fp_tests_disabled(sensorType) {
|
|||
}, `${sensorName}: ${header} disallows same-origin iframes.`);
|
||||
|
||||
async_test(t => {
|
||||
assert_true(sensorName in self);
|
||||
test_feature_availability(
|
||||
desc,
|
||||
t,
|
||||
|
@ -46,17 +49,18 @@ function run_fp_tests_disabled(sensorType) {
|
|||
}, `${sensorName}: ${header} disallows cross-origin iframes.`);
|
||||
}
|
||||
|
||||
function run_fp_tests_enabled(sensorType) {
|
||||
const sensorName = sensorType.name;
|
||||
function run_fp_tests_enabled(sensorName) {
|
||||
const sensorType = self[sensorName];
|
||||
const featureNameList = feature_policies[sensorName];
|
||||
const header = "Feature-Policy header " + featureNameList.join(" *;") + " *";
|
||||
const desc = "'new " + sensorName + "()'";
|
||||
|
||||
test(() => {
|
||||
assert_true(sensorName in window);
|
||||
assert_true(sensorName in self);
|
||||
}, `${sensorName}: ${header} allows the top-level document.`);
|
||||
|
||||
async_test(t => {
|
||||
assert_true(sensorName in self);
|
||||
test_feature_availability(
|
||||
desc,
|
||||
t,
|
||||
|
@ -66,6 +70,7 @@ function run_fp_tests_enabled(sensorType) {
|
|||
}, `${sensorName}: ${header} allows same-origin iframes.`);
|
||||
|
||||
async_test(t => {
|
||||
assert_true(sensorName in self);
|
||||
test_feature_availability(
|
||||
desc,
|
||||
t,
|
||||
|
@ -75,13 +80,14 @@ function run_fp_tests_enabled(sensorType) {
|
|||
}, `${sensorName}: ${header} allows cross-origin iframes.`);
|
||||
}
|
||||
|
||||
function run_fp_tests_enabled_by_attribute(sensorType) {
|
||||
const sensorName = sensorType.name;
|
||||
function run_fp_tests_enabled_by_attribute(sensorName) {
|
||||
const sensorType = self[sensorName];
|
||||
const featureNameList = feature_policies[sensorName];
|
||||
const header = "Feature-Policy allow='" + featureNameList.join(" ") + "' attribute";
|
||||
const desc = "'new " + sensorName + "()'";
|
||||
|
||||
async_test(t => {
|
||||
assert_true(sensorName in self);
|
||||
test_feature_availability(
|
||||
desc,
|
||||
t,
|
||||
|
@ -92,6 +98,7 @@ function run_fp_tests_enabled_by_attribute(sensorType) {
|
|||
}, `${sensorName}: ${header} allows same-origin iframe`);
|
||||
|
||||
async_test(t => {
|
||||
assert_true(sensorName in self);
|
||||
test_feature_availability(
|
||||
desc,
|
||||
t,
|
||||
|
@ -102,13 +109,14 @@ function run_fp_tests_enabled_by_attribute(sensorType) {
|
|||
}, `${sensorName}: ${header} allows cross-origin iframe`);
|
||||
}
|
||||
|
||||
function run_fp_tests_enabled_by_attribute_redirect_on_load(sensorType) {
|
||||
const sensorName = sensorType.name;
|
||||
function run_fp_tests_enabled_by_attribute_redirect_on_load(sensorName) {
|
||||
const sensorType = self[sensorName];
|
||||
const featureNameList = feature_policies[sensorName];
|
||||
const header = "Feature-Policy allow='" + featureNameList.join(" ") + "' attribute";
|
||||
const desc = "'new " + sensorName + "()'";
|
||||
|
||||
async_test(t => {
|
||||
assert_true(sensorName in self);
|
||||
test_feature_availability(
|
||||
desc,
|
||||
t,
|
||||
|
@ -119,6 +127,7 @@ function run_fp_tests_enabled_by_attribute_redirect_on_load(sensorType) {
|
|||
}, `${sensorName}: ${header} allows same-origin relocation`);
|
||||
|
||||
async_test(t => {
|
||||
assert_true(sensorName in self);
|
||||
test_feature_availability(
|
||||
desc,
|
||||
t,
|
||||
|
@ -129,17 +138,18 @@ function run_fp_tests_enabled_by_attribute_redirect_on_load(sensorType) {
|
|||
}, `${sensorName}: ${header} disallows cross-origin relocation`);
|
||||
}
|
||||
|
||||
function run_fp_tests_enabled_on_self_origin(sensorType) {
|
||||
const sensorName = sensorType.name;
|
||||
function run_fp_tests_enabled_on_self_origin(sensorName) {
|
||||
const sensorType = self[sensorName];
|
||||
const featureNameList = feature_policies[sensorName];
|
||||
const header = "Feature-Policy header " + featureNameList.join(" 'self';") + " 'self'";
|
||||
const desc = "'new " + sensorName + "()'";
|
||||
|
||||
test(() => {
|
||||
assert_true(sensorName in window);
|
||||
assert_true(sensorName in self);
|
||||
}, `${sensorName}: ${header} allows the top-level document.`);
|
||||
|
||||
async_test(t => {
|
||||
assert_true(sensorName in self);
|
||||
test_feature_availability(
|
||||
desc,
|
||||
t,
|
||||
|
@ -149,6 +159,7 @@ function run_fp_tests_enabled_on_self_origin(sensorType) {
|
|||
}, `${sensorName}: ${header} allows same-origin iframes.`);
|
||||
|
||||
async_test(t => {
|
||||
assert_true(sensorName in self);
|
||||
test_feature_availability(
|
||||
desc,
|
||||
t,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue