Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / http / tests / inspector / network / network-xhr-async-response-type-blob.html
1 <html>
2 <head>
3 <script src="../inspector-test.js"></script>
4 <script src="../network-test.js"></script>
5 <script>
6 function test()
7 {
8     // Since this test could be run together with other inspector backend cache
9     // tests, we need to reset size limits to default ones.
10     InspectorTest.resetInspectorResourcesData(step1);
11
12     function step1()
13     {
14         InspectorTest.recordNetwork();
15         InspectorTest.makeXHR("GET", "resources/resource.php", true, undefined, undefined, [], false, undefined, 'blob', step2);
16     }
17
18     function step2()
19     {
20         var request1 = InspectorTest.networkRequests().pop();
21         InspectorTest.addResult(request1.url);
22         InspectorTest.addResult("resource.type: " + request1.type);
23         InspectorTest.addResult("resource.size: " + request1.resourceSize);
24         InspectorTest.addResult("resource.content before requesting content: " + request1.content);
25         InspectorTest.assertTrue(!request1.failed, "Resource loading failed.");
26         request1.requestContent(step3);
27     }
28
29     function step3()
30     {
31         var request1 = InspectorTest.networkRequests().pop();
32         InspectorTest.addResult("resource.content after requesting content: " + request1.content);
33
34         InspectorTest.completeTest();
35     }
36 }
37 </script>
38 </head>
39 <body onload="runTest()">
40  <p>
41  Tests XHR network resource type and size for asynchronous requests when "blob" is specified as the response type.
42 </p>
43 </body>
44 </html>