aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/FileAPI/blob/Blob-text.any.js
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2023-06-26 10:48:30 +0200
committerMartin Robinson <mrobinson@igalia.com>2023-06-26 10:48:30 +0200
commit1359e8e4624d10ceb0bf55bcb1cb2903141c6d38 (patch)
tree131f289fd18efb5b28653f6b5d83953f8e6c820b /tests/wpt/web-platform-tests/FileAPI/blob/Blob-text.any.js
parentf017169ae482effc446384050e79b752bd9ddfe5 (diff)
downloadservo-1359e8e4624d10ceb0bf55bcb1cb2903141c6d38.tar.gz
servo-1359e8e4624d10ceb0bf55bcb1cb2903141c6d38.zip
Move `tests/wpt/web-platform-tests` to `tests/wpt/tests`
Diffstat (limited to 'tests/wpt/web-platform-tests/FileAPI/blob/Blob-text.any.js')
-rw-r--r--tests/wpt/web-platform-tests/FileAPI/blob/Blob-text.any.js64
1 files changed, 0 insertions, 64 deletions
diff --git a/tests/wpt/web-platform-tests/FileAPI/blob/Blob-text.any.js b/tests/wpt/web-platform-tests/FileAPI/blob/Blob-text.any.js
deleted file mode 100644
index d04fa97cffe..00000000000
--- a/tests/wpt/web-platform-tests/FileAPI/blob/Blob-text.any.js
+++ /dev/null
@@ -1,64 +0,0 @@
-// META: title=Blob Text
-// META: script=../support/Blob.js
-'use strict';
-
-promise_test(async () => {
- const blob = new Blob(["PASS"]);
- const text = await blob.text();
- assert_equals(text, "PASS");
-}, "Blob.text()")
-
-promise_test(async () => {
- const blob = new Blob();
- const text = await blob.text();
- assert_equals(text, "");
-}, "Blob.text() empty blob data")
-
-promise_test(async () => {
- const blob = new Blob(["P", "A", "SS"]);
- const text = await blob.text();
- assert_equals(text, "PASS");
-}, "Blob.text() multi-element array in constructor")
-
-promise_test(async () => {
- const non_unicode = "\u0061\u030A";
- const input_arr = new TextEncoder().encode(non_unicode);
- const blob = new Blob([input_arr]);
- const text = await blob.text();
- assert_equals(text, non_unicode);
-}, "Blob.text() non-unicode")
-
-promise_test(async () => {
- const blob = new Blob(["PASS"], { type: "text/plain;charset=utf-16le" });
- const text = await blob.text();
- assert_equals(text, "PASS");
-}, "Blob.text() different charset param in type option")
-
-promise_test(async () => {
- const non_unicode = "\u0061\u030A";
- const input_arr = new TextEncoder().encode(non_unicode);
- const blob = new Blob([input_arr], { type: "text/plain;charset=utf-16le" });
- const text = await blob.text();
- assert_equals(text, non_unicode);
-}, "Blob.text() different charset param with non-ascii input")
-
-promise_test(async () => {
- const input_arr = new Uint8Array([192, 193, 245, 246, 247, 248, 249, 250, 251,
- 252, 253, 254, 255]);
- const blob = new Blob([input_arr]);
- const text = await blob.text();
- assert_equals(text, "\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd" +
- "\ufffd\ufffd\ufffd\ufffd");
-}, "Blob.text() invalid utf-8 input")
-
-promise_test(async () => {
- const input_arr = new Uint8Array([192, 193, 245, 246, 247, 248, 249, 250, 251,
- 252, 253, 254, 255]);
- const blob = new Blob([input_arr]);
- const text_results = await Promise.all([blob.text(), blob.text(),
- blob.text()]);
- for (let text of text_results) {
- assert_equals(text, "\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd" +
- "\ufffd\ufffd\ufffd\ufffd");
- }
-}, "Blob.text() concurrent reads")