mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 2b7dace05fc1869398ee24f84fda4c0e4c0455ae
This commit is contained in:
parent
b23125d590
commit
6c901de216
844 changed files with 19802 additions and 3093 deletions
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<body>
|
||||
<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=/common/media.js></script>
|
||||
<script src=/feature-policy/resources/featurepolicy.js></script>
|
||||
<script src=/feature-policy/resources/autoplay.js></script>
|
||||
<script>
|
||||
'use strict';
|
||||
const relative_path = '/feature-policy/resources/feature-policy-autoplay.html';
|
||||
const base_src = '/feature-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;
|
||||
const header = 'Feature-Policy allow="autoplay"';
|
||||
|
||||
async_test(t => {
|
||||
simulateGesture(t, () => {
|
||||
test_feature_availability(
|
||||
'autoplay', t, same_origin_src,
|
||||
expect_feature_available_default, 'autoplay');
|
||||
});
|
||||
}, header + ' allows same-origin navigation in an iframe.');
|
||||
|
||||
async_test(t => {
|
||||
simulateGesture(t, () => {
|
||||
test_feature_availability(
|
||||
'autoplay', t, cross_origin_src,
|
||||
expect_feature_unavailable_default, 'autoplay');
|
||||
});
|
||||
}, header + ' disallows cross-origin navigation in an iframe.');
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<body>
|
||||
<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=/common/media.js></script>
|
||||
<script src=/feature-policy/resources/featurepolicy.js></script>
|
||||
<script src=/feature-policy/resources/autoplay.js></script>
|
||||
<script>
|
||||
'use strict';
|
||||
const same_origin_src = '/feature-policy/resources/feature-policy-autoplay.html';
|
||||
const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
|
||||
same_origin_src;
|
||||
const feature_name = 'Feature policy "autoplay"';
|
||||
const header = 'allow="autoplay" attribute';
|
||||
|
||||
async_test(t => {
|
||||
simulateGesture(t, () => {
|
||||
test_feature_availability(
|
||||
'autoplay', t, same_origin_src,
|
||||
expect_feature_available_default, 'autoplay');
|
||||
});
|
||||
}, feature_name + ' can be enabled in same-origin iframe using ' + header);
|
||||
|
||||
async_test(t => {
|
||||
simulateGesture(t, () => {
|
||||
test_feature_availability(
|
||||
'autoplay', t, cross_origin_src,
|
||||
expect_feature_available_default, 'autoplay');
|
||||
});
|
||||
}, feature_name + ' can be enabled in cross-origin iframe using ' + header);
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<body>
|
||||
<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=/common/media.js></script>
|
||||
<script src=/feature-policy/resources/featurepolicy.js></script>
|
||||
<script src=/feature-policy/resources/autoplay.js></script>
|
||||
<script>
|
||||
'use strict';
|
||||
const same_origin_src = '/feature-policy/resources/feature-policy-autoplay.html';
|
||||
const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
|
||||
same_origin_src;
|
||||
const header = 'Feature-Policy header: autoplay *';
|
||||
|
||||
async_test(t => {
|
||||
simulateGesture(t, () => {
|
||||
isAutoplayAllowed().then(t.step_func_done((result) => {
|
||||
assert_true(result);
|
||||
}));
|
||||
});
|
||||
}, header + ' allows the top-level document.');
|
||||
|
||||
async_test(t => {
|
||||
simulateGesture(t, () => {
|
||||
test_feature_availability('autoplay', t, same_origin_src,
|
||||
expect_feature_available_default);
|
||||
});
|
||||
}, header + ' allows same-origin iframes.');
|
||||
|
||||
async_test(t => {
|
||||
simulateGesture(t, () => {
|
||||
test_feature_availability('autoplay', t, cross_origin_src,
|
||||
expect_feature_available_default);
|
||||
});
|
||||
}, header + ' allows cross-origin iframes.');
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1 @@
|
|||
Feature-Policy: autoplay *
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<body>
|
||||
<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=/common/media.js></script>
|
||||
<script src=/feature-policy/resources/featurepolicy.js></script>
|
||||
<script src=/feature-policy/resources/autoplay.js></script>
|
||||
<script>
|
||||
'use strict';
|
||||
const same_origin_src = '/feature-policy/resources/feature-policy-autoplay.html';
|
||||
const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
|
||||
same_origin_src;
|
||||
const header = 'Default "autoplay" feature policy ["self"]';
|
||||
|
||||
async_test(t => {
|
||||
simulateGesture(t, () => {
|
||||
isAutoplayAllowed().then(t.step_func_done((result) => {
|
||||
assert_true(result);
|
||||
}));
|
||||
});
|
||||
}, header + ' allows the top-level document.');
|
||||
|
||||
async_test(t => {
|
||||
simulateGesture(t, () => {
|
||||
test_feature_availability('autoplay', t, same_origin_src,
|
||||
expect_feature_available_default);
|
||||
});
|
||||
}, header + ' allows same-origin iframes.');
|
||||
|
||||
async_test(t => {
|
||||
simulateGesture(t, () => {
|
||||
test_feature_availability('autoplay', t, cross_origin_src,
|
||||
expect_feature_unavailable_default,);
|
||||
});
|
||||
}, header + ' disallows cross-origin iframes.');
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<body>
|
||||
<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=/common/media.js></script>
|
||||
<script src=/feature-policy/resources/featurepolicy.js></script>
|
||||
<script src=/feature-policy/resources/autoplay.js></script>
|
||||
<script>
|
||||
'use strict';
|
||||
const same_origin_src = '/feature-policy/resources/feature-policy-autoplay.html';
|
||||
const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
|
||||
same_origin_src;
|
||||
const header = 'Feature-Policy header: autoplay "none"';
|
||||
|
||||
async_test(t => {
|
||||
simulateGesture(t, () => {
|
||||
isAutoplayAllowed().then(t.step_func_done((result) => {
|
||||
assert_true(result);
|
||||
}));
|
||||
});
|
||||
}, header + ' has no effect on the top level document.');
|
||||
|
||||
async_test(t => {
|
||||
simulateGesture(t, () => {
|
||||
test_feature_availability('autoplay', t, same_origin_src,
|
||||
expect_feature_unavailable_default);
|
||||
});
|
||||
}, header + ' disallows same-origin iframes.');
|
||||
|
||||
async_test(t => {
|
||||
simulateGesture(t, () => {
|
||||
test_feature_availability('autoplay', t, cross_origin_src,
|
||||
expect_feature_unavailable_default,);
|
||||
});
|
||||
}, header + ' disallows cross-origin iframes.');
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1 @@
|
|||
Feature-Policy: autoplay 'none'
|
Loading…
Add table
Add a link
Reference in a new issue