mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
Update web-platform-tests to revision 132d12daea699ce266324e79eecbe59b10e56502
This commit is contained in:
parent
527d874bc1
commit
fe00a63040
1004 changed files with 18598 additions and 92770 deletions
|
@ -6,7 +6,8 @@
|
|||
|
||||
<script>
|
||||
var test = async_test('Test freeze callback.');
|
||||
var childWindow = window.open('resources/window.html', 'Child Window');
|
||||
window.open('resources/window.html', 'Child Window');
|
||||
|
||||
var total_steps = 0;
|
||||
|
||||
const StepStatus = {
|
||||
|
|
|
@ -45,6 +45,15 @@ function testXHR(async) {
|
|||
};
|
||||
}
|
||||
|
||||
function testSendBeacon() {
|
||||
var name = 'testSendBeacon';
|
||||
window.opener.add_step(name);
|
||||
if (navigator.sendBeacon("foo.txt", "data=1"))
|
||||
window.opener.step_success(name);
|
||||
else
|
||||
window.opener.step_fail(name);
|
||||
}
|
||||
|
||||
window.document.addEventListener("freeze", () => {
|
||||
// Testing fetch, only fetch keepalive should succeed.
|
||||
testFetch(true /* keepalive */);
|
||||
|
@ -52,11 +61,12 @@ window.document.addEventListener("freeze", () => {
|
|||
// Testing XHR, both sync and async should fail.
|
||||
testXHR(true /* async */);
|
||||
testXHR(false /* sync */);
|
||||
// Testing navigator.sendBeacon, which should be allowed.
|
||||
testSendBeacon();
|
||||
window.opener.step_success(freezingStepName);
|
||||
});
|
||||
|
||||
onload = function() {
|
||||
window.opener.focus();
|
||||
window.opener.add_step(freezingStepName);
|
||||
test_driver.freeze();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue