| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../../../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <p id="description"></p> |
| <div id="console"></div> |
| <script> |
| description("Test that filename passed to FormData.append() takes precedence over default Blob filename 'blob', even if empty."); |
| |
| self.jsTestIsAsync = true; |
| |
| function runTest() |
| { |
| debug("Sending FormData containing one blob with custom empty filename:"); |
| |
| var formData = new FormData; |
| formData.append("blob", new Blob([""]), ""); |
| var xhr = new XMLHttpRequest(); |
| xhr.open("POST", "http://127.0.0.1:8000/xmlhttprequest/resources/multipart-post-echo-filenames.py", true); |
| xhr.onload = function() { |
| filename = xhr.responseText; |
| shouldBe("filename", "''"); |
| finishJSTest(); |
| } |
| xhr.send(formData); |
| } |
| |
| runTest(); |
| |
| var successfullyParsed = true; |
| </script> |
| <script src="../../../../resources/js-test-post.js"></script> |
| </body> |
| </html> |
| |