summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/FileAPI/file/send-file-formdata-controls.any.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/FileAPI/file/send-file-formdata-controls.any.js
parentInitial commit. (diff)
downloadfirefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz
firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/FileAPI/file/send-file-formdata-controls.any.js')
-rw-r--r--testing/web-platform/tests/FileAPI/file/send-file-formdata-controls.any.js69
1 files changed, 69 insertions, 0 deletions
diff --git a/testing/web-platform/tests/FileAPI/file/send-file-formdata-controls.any.js b/testing/web-platform/tests/FileAPI/file/send-file-formdata-controls.any.js
new file mode 100644
index 0000000000..e95d3aada4
--- /dev/null
+++ b/testing/web-platform/tests/FileAPI/file/send-file-formdata-controls.any.js
@@ -0,0 +1,69 @@
+// META: title=FormData: FormData: Upload files named using controls
+// META: script=../support/send-file-formdata-helper.js
+ "use strict";
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-NUL-[\0].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-BS-[\b].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-VT-[\v].txt",
+ });
+
+ // These have characters that undergo processing in name=,
+ // filename=, and/or value; formDataPostFileUploadTest postprocesses
+ // expectedEncodedBaseName for these internally.
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-LF-[\n].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-LF-CR-[\n\r].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-CR-[\r].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-CR-LF-[\r\n].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-HT-[\t].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-FF-[\f].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-DEL-[\x7F].txt",
+ });
+
+ // The rest should be passed through unmodified:
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-ESC-[\x1B].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-SPACE-[ ].txt",
+ });