summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/FileAPI/file/send-file-formdata-punctuation.any.js
blob: 987dba39aff3a15f419c91254b7645a8c5b7af64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// META: title=FormData: FormData: Upload files named using punctuation
// META: script=../support/send-file-formdata-helper.js
  "use strict";

  // 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-QUOTATION-MARK-[\x22].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: '"file-for-upload-in-form-double-quoted.txt"',
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-REVERSE-SOLIDUS-[\\].txt",
  });

  // The rest should be passed through unmodified:

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-EXCLAMATION-MARK-[!].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-DOLLAR-SIGN-[$].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-PERCENT-SIGN-[%].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-AMPERSAND-[&].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-APOSTROPHE-['].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-LEFT-PARENTHESIS-[(].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-RIGHT-PARENTHESIS-[)].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-ASTERISK-[*].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-PLUS-SIGN-[+].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-COMMA-[,].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-FULL-STOP-[.].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-SOLIDUS-[/].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-COLON-[:].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-SEMICOLON-[;].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-EQUALS-SIGN-[=].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-QUESTION-MARK-[?].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-CIRCUMFLEX-ACCENT-[^].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-LEFT-SQUARE-BRACKET-[[].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-RIGHT-SQUARE-BRACKET-[]].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-LEFT-CURLY-BRACKET-[{].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-VERTICAL-LINE-[|].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-RIGHT-CURLY-BRACKET-[}].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "file-for-upload-in-form-TILDE-[~].txt",
  });

  formDataPostFileUploadTest({
    fileNameSource: "ASCII",
    fileBaseName: "'file-for-upload-in-form-single-quoted.txt'",
  });