summaryrefslogtreecommitdiff
path: root/testing/web-platform/tests/fetch/api/request/request-structure.html
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-02-04 19:41:06 +0000
committerMoonchild <moonchild@palemoon.org>2021-02-04 19:41:06 +0000
commit914368530ba622ff0117cd34bec058fb0d862155 (patch)
tree6c29459914d1b01ed27fad039d0b982d1dbc32c3 /testing/web-platform/tests/fetch/api/request/request-structure.html
parentc5ad76a2875ca5c06c5bbff7b2f2e3ff7b3599c3 (diff)
downloaduxp-914368530ba622ff0117cd34bec058fb0d862155.tar.gz
Issue #439 - Remove web-platform tests from the tree.
This removes a total of 23,936 files we would never use nor have the capacity to properly maintain or keep up-to-date.
Diffstat (limited to 'testing/web-platform/tests/fetch/api/request/request-structure.html')
-rw-r--r--testing/web-platform/tests/fetch/api/request/request-structure.html134
1 files changed, 0 insertions, 134 deletions
diff --git a/testing/web-platform/tests/fetch/api/request/request-structure.html b/testing/web-platform/tests/fetch/api/request/request-structure.html
deleted file mode 100644
index 9494689c75..0000000000
--- a/testing/web-platform/tests/fetch/api/request/request-structure.html
+++ /dev/null
@@ -1,134 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>Request structure</title>
- <meta name="help" href="https://fetch.spec.whatwg.org/#request">
- <meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <script>
- var request = new Request("");
- var methods = ["clone",
- //Request implements Body
- "arrayBuffer",
- "blob",
- "formData",
- "json",
- "text"
- ];
- var attributes = ["method",
- "url",
- "headers",
- "type",
- "destination",
- "referrer",
- "referrerPolicy",
- "mode",
- "credentials",
- "cache",
- "redirect",
- "integrity",
- //Request implements Body
- "bodyUsed"
- ];
-
- function IsreadOnly(request, attributeToCheck) {
- var defaultValue = undefined;
- var newValue = undefined;
- switch (attributeToCheck) {
- case "method":
- defaultValue = "GET";
- newValue = "POST";
- break;
-
- case "url":
- //default value is base url
- //i.e http://web-platform.test:8000/fetch/api/request-structure.html
- newValue = "http://url.test";
- break;
-
- case "headers":
- request.headers = new Headers ({"name":"value"});
- assert_false(request.headers.has("name"), "Headers attribute is read only");
- return;
- break;
-
- case "type":
- defaultValue = "";
- newValue = "style";
- break;
-
- case "destination":
- defaultValue = "";
- newValue = "worker";
- break;
-
- case "referrer":
- defaultValue = "about:client";
- newValue = "http://url.test";
- break;
-
- case "referrerPolicy":
- defaultValue = "";
- newValue = "unsafe-url";
- break;
-
- case "mode":
- defaultValue = "cors";
- newValue = "navigate";
- break;
-
- case "credentials":
- defaultValue = "same-origin";
- newValue = "cors";
- break;
-
- case "cache":
- defaultValue = "default";
- newValue = "reload";
- break;
-
- case "redirect":
- defaultValue = "follow";
- newValue = "manual";
- break;
-
- case "integrity":
- newValue = "CannotWriteIntegrity";
- break;
-
- case "bodyUsed":
- defaultValue = false;
- newValue = true;
- break;
-
- default:
- return;
- }
-
- request[attributeToCheck] = newValue;
- if (defaultValue === undefined)
- assert_not_equals(request[attributeToCheck], newValue, "Attribute " + attributeToCheck + " is read only");
- else
- assert_equals(request[attributeToCheck], defaultValue,
- "Attribute " + attributeToCheck + " is read only. Default value is " + defaultValue);
- }
-
- for (var idx in methods) {
- test(function() {
- assert_true(methods[idx] in request, "request has " + methods[idx] + " method");
- }, "Request has " + methods[idx] + " method");
- }
-
- for (var idx in attributes) {
- test(function() {
- assert_true(attributes[idx] in request, "request has " + attributes[idx] + " attribute");
- IsreadOnly(request, attributes[idx]);
- }, "Check " + attributes[idx] + " attribute");
- }
- </script>
- </body>
-</html>