Update web-platform-tests to revision 132d12daea699ce266324e79eecbe59b10e56502

This commit is contained in:
WPT Sync Bot 2018-06-08 21:05:21 -04:00
parent 527d874bc1
commit fe00a63040
1004 changed files with 18598 additions and 92770 deletions

View file

@ -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 = {

View file

@ -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();
};