Fetch: split up fetch/api/request/request-keepalive-quota.html
Part of #11571.
diff --git a/fetch/api/request/request-keepalive-quota.html b/fetch/api/request/request-keepalive-quota.html
index 19596ce..f71b1b2 100644
--- a/fetch/api/request/request-keepalive-quota.html
+++ b/fetch/api/request/request-keepalive-quota.html
@@ -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);