OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <link rel="stylesheet" href="../../../../fast/js/resources/js-test-style.css"> | 4 <link rel="stylesheet" href="../../../../fast/js/resources/js-test-style.css"> |
5 <script src="../../../../fast/js/resources/js-test-pre.js"></script> | 5 <script src="../../../../fast/js/resources/js-test-pre.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <p id="description"></p> | 8 <p id="description"></p> |
9 <div id="console"></div> | 9 <div id="console"></div> |
10 <script src="resources/send-form-data-common.js"></script> | 10 <script src="resources/send-form-data-common.js"></script> |
11 <script> | 11 <script> |
12 function addXHREventHandlers(xhr, file) { | 12 function addXHREventHandlers(xhr, file) { |
13 xhr.onreadystatechange = function(event) { | 13 xhr.onreadystatechange = function(event) { |
14 if (xhr.readyState == xhr.DONE) { | 14 if (xhr.readyState == xhr.DONE) { |
15 window.xhr = xhr; | 15 window.xhr = xhr; |
16 shouldBe("xhr.responseText", "'file1=file.invalid:application/oc
tet-stream:1234567890'"); | 16 shouldBe("xhr.responseText", "'file1=file.invalid:application/oc
tet-stream:1234567890'"); |
17 finishJSTest(); | 17 finishJSTest(); |
18 } | 18 } |
19 } | 19 } |
20 } | 20 } |
21 | 21 |
22 testSendingFormData([{'type': 'file', 'name': 'file1', 'value': '../resource
s/file.invalid'}], true, addXHREventHandlers); | 22 testSendingFormData([{'type': 'file', 'name': 'file1', 'value': '../resource
s/file.invalid'}], true, addXHREventHandlers); |
23 var successfullyParsed = true; | 23 var successfullyParsed = true; |
24 var jsTestIsAsync = true; | 24 var jsTestIsAsync = true; |
25 </script> | 25 </script> |
26 <script src="../../../../fast/js/resources/js-test-post.js"></script> | 26 <script src="../../../../fast/js/resources/js-test-post.js"></script> |
27 </body> | 27 </body> |
28 </html> | 28 </html> |
OLD | NEW |