Update web-platform-tests to revision 7a6f5673ff5d146ca5c09c6a1b42b7706cfee328

This commit is contained in:
WPT Sync Bot 2018-06-28 21:05:13 -04:00
parent e2fca1b228
commit 4787b28da3
261 changed files with 8195 additions and 4689 deletions

View file

@ -6,9 +6,13 @@
<meta name="help" href="https://fetch.spec.whatwg.org/#request">
<meta name="help" href="https://fetch.spec.whatwg.org/#body-mixin">
<meta name="author" title="Microsoft Edge" href="https://www.microsoft.com">
<meta name="timeout" content="long">
<meta name="variant" content="?include=fast">
<meta name="variant" content="?include=slow-1">
<meta name="variant" content="?include=slow-2">
<meta name="variant" content="?include=slow-3">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/subset-tests-by-key.js"></script>
</head>
<body>
<script>
@ -38,22 +42,22 @@
}
// Test 1 Byte
promise_test(function(test) {
subsetTestByKey("fast", promise_test, function(test) {
return fetchKeepAliveRequest(noDelay, 1 /* bodySize */);
}, 'A Keep-Alive fetch() with a small body should succeed.');
// Test Quota full limit
promise_test(function(test) {
subsetTestByKey("fast", promise_test, function(test) {
return fetchKeepAliveRequest(noDelay, expectedQuota /* bodySize */);
}, 'A Keep-Alive fetch() with a body at the Quota Limit should succeed.');
// Test Quota + 1 Byte
promise_test(function(test) {
subsetTestByKey("fast", promise_test, function(test) {
return promise_rejects(test, TypeError(), fetchKeepAliveRequest(noDelay, expectedQuota + 1));
}, 'A Keep-Alive fetch() with a body over the Quota Limit should reject.');
// Test the Quota becomes available upon promise completion.
promise_test(function (test) {
subsetTestByKey("slow-1", promise_test, function (test) {
// Fill our Quota then try to send a second fetch.
return fetchKeepAliveRequest(standardDelay, expectedQuota).then(() => {
// Now validate that we can send another Keep-Alive fetch for the full size of the quota.
@ -62,7 +66,7 @@
}, 'A Keep-Alive fetch() should return its allocated Quota upon promise resolution.');
// Ensure only the correct amount of Quota becomes available when a fetch completes.
promise_test(function(test) {
subsetTestByKey("slow-2", promise_test, function(test) {
// Create a fetch that uses all but 1 Byte of the Quota and runs for 2x as long as the other requests.
const first = fetchKeepAliveRequest(standardDelay * 2, expectedQuota - 1);
@ -79,7 +83,7 @@
}, 'A Keep-Alive fetch() should return only its allocated Quota upon promise resolution.');
// Test rejecting a fetch() after the quota is used up.
promise_test(function (test) {
subsetTestByKey("slow-3", promise_test, function (test) {
// Fill our Quota then try to send a second fetch.
const p = fetchKeepAliveRequest(standardDelay, expectedQuota);