[nrwt] handle corrupt http server pid files cleanly
[WebKit-https.git] / LayoutTests / http / tests / local / formdata / send-form-data-with-empty-blob-filename.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../../fast/js/resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <div id="console"></div>
9 <script>
10 description("Test that filename passed to FormData.append() takes precedence over default Blob filename 'blob', even if empty.");
11
12 self.jsTestIsAsync = true;
13
14 function runTest()
15 {
16     debug("Sending FormData containing one blob with custom empty filename:");
17
18     var formData = new FormData;
19     formData.append("blob", new Blob([""]), "");
20     var xhr = new XMLHttpRequest();
21     xhr.open("POST", "http://127.0.0.1:8000/xmlhttprequest/resources/multipart-post-echo-filenames.php", true);
22     xhr.onload = function() {
23         filename = xhr.responseText;
24         shouldBe("filename", "''");
25         finishJSTest();
26     }
27     xhr.send(formData);
28 }
29
30 runTest();
31
32 var successfullyParsed = true;
33 </script>
34 <script src="../../../../fast/js/resources/js-test-post.js"></script>
35 </body>
36 </html>
37