aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt
diff options
context:
space:
mode:
authorTIN TUN AUNG <62133983+rayguo17@users.noreply.github.com>2025-01-14 08:21:29 +0800
committerGitHub <noreply@github.com>2025-01-14 00:21:29 +0000
commit55ac1887dc57f5b7924059ed57612338a2c7bf51 (patch)
treef4c9a466340a7aa37ea63db4db17d0d43665daeb /tests/wpt
parentfaf30176f18e276125cbdac4a5750834258460c5 (diff)
downloadservo-55ac1887dc57f5b7924059ed57612338a2c7bf51.tar.gz
servo-55ac1887dc57f5b7924059ed57612338a2c7bf51.zip
Add Content Range Header and add one for blob end range (#34797)
Signed-off-by: rayguo17 <rayguo17@gmail.com>
Diffstat (limited to 'tests/wpt')
-rw-r--r--tests/wpt/meta/fetch/range/blob.any.js.ini24
-rw-r--r--tests/wpt/meta/xhr/blob-range.any.js.ini20
-rw-r--r--tests/wpt/mozilla/meta/MANIFEST.json7
-rw-r--r--tests/wpt/mozilla/tests/mozilla/range_request_blob_url.html60
4 files changed, 22 insertions, 89 deletions
diff --git a/tests/wpt/meta/fetch/range/blob.any.js.ini b/tests/wpt/meta/fetch/range/blob.any.js.ini
index b20ec230d9d..9dd565dc64f 100644
--- a/tests/wpt/meta/fetch/range/blob.any.js.ini
+++ b/tests/wpt/meta/fetch/range/blob.any.js.ini
@@ -1,18 +1,18 @@
[blob.any.html]
[A simple blob range request.]
- expected: FAIL
+ expected: PASS
[A blob range request with no end.]
- expected: FAIL
+ expected: PASS
[A blob range request with no start.]
- expected: FAIL
+ expected: PASS
[A simple blob range request with whitespace.]
- expected: FAIL
+ expected: PASS
[Blob content with short content and a large range end]
- expected: FAIL
+ expected: PASS
[Blob range with whitespace before and after hyphen]
expected: FAIL
@@ -60,7 +60,7 @@
expected: FAIL
[Blob content with short content and a range end matching content length]
- expected: FAIL
+ expected: PASS
[Blob range with no value]
expected: FAIL
@@ -83,19 +83,19 @@
[blob.any.worker.html]
[A simple blob range request.]
- expected: FAIL
+ expected: PASS
[A blob range request with no end.]
- expected: FAIL
+ expected: PASS
[A blob range request with no start.]
- expected: FAIL
+ expected: PASS
[A simple blob range request with whitespace.]
- expected: FAIL
+ expected: PASS
[Blob content with short content and a large range end]
- expected: FAIL
+ expected: PASS
[Blob range with whitespace before and after hyphen]
expected: FAIL
@@ -143,7 +143,7 @@
expected: FAIL
[Blob content with short content and a range end matching content length]
- expected: FAIL
+ expected: PASS
[Blob range with no value]
expected: FAIL
diff --git a/tests/wpt/meta/xhr/blob-range.any.js.ini b/tests/wpt/meta/xhr/blob-range.any.js.ini
index e743d94658e..158301c7929 100644
--- a/tests/wpt/meta/xhr/blob-range.any.js.ini
+++ b/tests/wpt/meta/xhr/blob-range.any.js.ini
@@ -1,24 +1,24 @@
[blob-range.any.worker.html]
[A simple blob range request.]
- expected: FAIL
+ expected: PASS
[A blob range request with no type.]
expected: FAIL
[A blob range request with no end.]
- expected: FAIL
+ expected: PASS
[A blob range request with no start.]
- expected: FAIL
+ expected: PASS
[A simple blob range request with whitespace.]
expected: FAIL
[Blob content with short content and a large range end]
- expected: FAIL
+ expected: PASS
[Blob content with short content and a range end matching content length]
- expected: FAIL
+ expected: PASS
[Blob range with whitespace before and after hyphen]
expected: FAIL
@@ -83,25 +83,25 @@
[blob-range.any.html]
[A simple blob range request.]
- expected: FAIL
+ expected: PASS
[A blob range request with no type.]
expected: FAIL
[A blob range request with no end.]
- expected: FAIL
+ expected: PASS
[A blob range request with no start.]
- expected: FAIL
+ expected: PASS
[A simple blob range request with whitespace.]
expected: FAIL
[Blob content with short content and a large range end]
- expected: FAIL
+ expected: PASS
[Blob content with short content and a range end matching content length]
- expected: FAIL
+ expected: PASS
[Blob range with whitespace before and after hyphen]
expected: FAIL
diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json
index 0e36ca7dca4..2577bfabe3e 100644
--- a/tests/wpt/mozilla/meta/MANIFEST.json
+++ b/tests/wpt/mozilla/meta/MANIFEST.json
@@ -13905,13 +13905,6 @@
{}
]
],
- "range_request_blob_url.html": [
- "075397620e989dafc814c0ed2bca46bd476bccf6",
- [
- null,
- {}
- ]
- ],
"range_request_file_url.html": [
"4fd4ddc8b1a9959e90b243795267c220d6a05f5e",
[
diff --git a/tests/wpt/mozilla/tests/mozilla/range_request_blob_url.html b/tests/wpt/mozilla/tests/mozilla/range_request_blob_url.html
deleted file mode 100644
index 075397620e9..00000000000
--- a/tests/wpt/mozilla/tests/mozilla/range_request_blob_url.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<html>
-<head>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script>
-[{
- range: "bytes=0-",
- status: 206,
- expected: "abcdefghijklmnopqrstuvwxyz"
-}, {
- range: "bytes=0-9",
- status: 206,
- expected: "abcdefghi"
-}, {
- range: "bytes=1-9",
- status: 206,
- expected: "bcdefghi"
-}, {
- range: "bytes=-10",
- status: 206,
- expected: "qrstuvwxyz"
-}, {
- range: "bytes=0-100",
- status: 206,
- expected: "abcdefghijklmnopqrstuvwxyz"
-}, {
- range: "bytes=100-",
- status: 416,
- expected: ""
-}, {
- range: "bytes=-100",
- status: 206,
- expected: "abcdefghijklmnopqrstuvwxyz"
-}].forEach(test => {
- promise_test(function() {
- const abc = "abcdefghijklmnopqrstuvwxyz";
- const blob = new Blob([abc], { "type": "text/plain" });
- return fetch(URL.createObjectURL(blob), {
- headers: {
- "Range": test.range
- }
- })
- .then(response => {
- assert_equals(response.status, test.status);
- if (response.status != 206) {
- return "";
- }
- return response.text();
- })
- .then(response => {
- assert_equals(response, test.expected);
- });
- });
-});
-
-</script>
-</head>
-</body>
-</html>
-