summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/FileAPI/file/send-file-formdata-controls.any.js
blob: e95d3aada4421fc1d8f4d1328b569008e5654eca (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
// 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",
  });