mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
Update web-platform-tests to revision 3f9178031eec5374c9a7d5709a7e11ba4a1955ed
This commit is contained in:
parent
4997ec26c2
commit
a5af9a106a
192 changed files with 3943 additions and 1927 deletions
|
@ -0,0 +1 @@
|
|||
window.didExecuteExternalAsyncScript = true;
|
|
@ -0,0 +1 @@
|
|||
window.didExecuteExternalDeferredScript = true;
|
|
@ -0,0 +1 @@
|
|||
window.didExecuteExternalParsingBlockingScript = true;
|
|
@ -0,0 +1,9 @@
|
|||
var t = async_test('Test behavior of sync-script feature policy for different script types');
|
||||
|
||||
window.onload = t.step_func(function() {
|
||||
assert_equals(undefined, window.didExecuteInlineParsingBlockingScript, 'inline parser blocking script should be blocked');
|
||||
assert_equals(undefined, window.didExecuteExternalParsingBlockingScript, 'external parser blocking script should be blocked');
|
||||
assert_true(window.didExecuteExternalAsyncScript, 'external async script should not be blocked');
|
||||
assert_true(window.didExecuteExternalDeferredScript, 'external defer script should not be blocked');
|
||||
t.done();
|
||||
});
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<body>
|
||||
<script defer src="/resources/testharness.js"></script>
|
||||
<script defer src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
// The test harness scripts above are loaded as <script defer> because
|
||||
// they would be blocked if loaded synchronously.
|
||||
// Harness scripts should be evaluated before sync-script-test.js, so it
|
||||
// is also loaded as <script defer>
|
||||
//
|
||||
// The other scripts (both inline and external) are testing whether those
|
||||
// scripts are blocked or not.
|
||||
// sync-script-test.js asserts the results of the other scripts in onload
|
||||
// in order to guarantee that all scripts have either loaded or been blocked
|
||||
// before verifying the behavior.
|
||||
window.didExecuteInlineParsingBlockingScript = true;
|
||||
</script>
|
||||
<script src="/feature-policy/experimental-features/resources/parser-blocking-script.js"></script>
|
||||
<script async src="/feature-policy/experimental-features/resources/async-script.js"></script>
|
||||
<script defer src="/feature-policy/experimental-features/resources/defer-script.js"></script>
|
||||
<script defer src="/feature-policy/experimental-features/resources/sync-script-test.js"></script>
|
||||
</body>
|
|
@ -0,0 +1 @@
|
|||
Feature-Policy: sync-script 'none'
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
async_test(t => {
|
||||
test_feature_availability('picture-in-picture', t, cross_origin_src,
|
||||
expect_feature_available_default,);
|
||||
expect_feature_available_default);
|
||||
}, header + ' allows cross-origin iframes.');
|
||||
|
||||
</script>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
async_test(t => {
|
||||
test_feature_availability('picture-in-picture', t, cross_origin_src,
|
||||
expect_feature_unavailable_default,);
|
||||
expect_feature_unavailable_default);
|
||||
}, header + ' disallows cross-origin iframes.');
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
function isPictureInPictureAllowed() {
|
||||
if (!('pictureInPictureEnabled' in document))
|
||||
return Promise.resolve(false);
|
||||
|
||||
return new Promise(resolve => {
|
||||
let video = document.createElement('video');
|
||||
video.src = '/media/movie_5.ogv';
|
||||
|
@ -13,4 +16,4 @@ function isPictureInPictureAllowed() {
|
|||
});
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue