Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Side by Side Diff: LayoutTests/http/tests/inspector/network/network-fetch-post-payload.html

Issue 1301523002: [Fetch API] Send request body as a FormData. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../inspector-test.js"></script> 3 <script src="../inspector-test.js"></script>
4 <script src="../network-test.js"></script> 4 <script src="../network-test.js"></script>
5 <script> 5 <script>
6 function test() 6 function test()
7 { 7 {
8 var payload = "\u201AFoo\u201B"; 8 var payload = "\u201AFoo\u201B";
9 9
10 InspectorTest.recordNetwork(); 10 InspectorTest.recordNetwork();
11 InspectorTest.makeSimpleXHRWithPayload("POST", "resources/resource.php?foo", true, payload, step2); 11 InspectorTest.makeFetch("resources/resource.php?foo", {method: 'POST', body: payload}, step2);
caseq 2015/08/17 17:24:38 double quotes please!
yhirano 2015/08/18 09:12:39 Done.
12 12
13 function step2() 13 function step2()
14 { 14 {
15 var request = InspectorTest.networkRequests().pop(); 15 var request = InspectorTest.networkRequests().pop();
16 InspectorTest.addResult(request.url); 16 InspectorTest.addResult(request.url);
17 InspectorTest.assertEquals("foo", request.queryString(), "Unexpected res ource query."); 17 InspectorTest.assertEquals("foo", request.queryString(), "Unexpected res ource query.");
18 InspectorTest.assertEquals(payload, request.requestFormData, "Payload co rrupted."); 18 InspectorTest.assertEquals(payload, request.requestFormData, "Payload co rrupted.");
19 InspectorTest.completeTest(); 19 InspectorTest.completeTest();
20 } 20 }
21 } 21 }
22 </script> 22 </script>
23 </head> 23 </head>
24 <body onload="runTest()"> 24 <body onload="runTest()">
25 <p>Tests XHR network resource payload is not corrupted by transcoding.</p> 25 <p>Tests fetch() network resource payload is not corrupted by transcoding.</p>
26 </body> 26 </body>
27 </html> 27 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698