2 <title>Verify that attachment filenames are not normalized
</title>
3 <script src=
"/js-test-resources/js-test.js"></script>
5 description(document
.title
);
6 var jsTestIsAsync
= true;
10 filename
: decodeURIComponent("z%CC%87o%CC%81%C5%82c%CC%81.txt"),
12 content
: "hello world"
14 var file
= new File([request
.content
], request
.filename
, {type
: request
.type
});
15 shouldBe("file.name", "request.filename");
17 var data
= new FormData();
18 data
.append(request
.field
, file
);
20 var xhr
= new XMLHttpRequest();
22 xhr
.open("POST", "resources/multipart-post-echo.php", true);
24 xhr
.onreadystatechange = function(e
) {
25 if (xhr
.readyState
!== xhr
.DONE
)
27 match
= xhr
.responseText
.match(/^(.*)=(.*):(.*):(.*)$/);
35 shouldBe("response.field", "request.field");
36 shouldBe("response.filename", "request.filename");
37 shouldBe("response.type", "request.type");
38 shouldBe("response.content", "request.content");