OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
2 <head> | |
3 <script src="inspector-test.js"></script> | |
4 <script src="timeline-test.js"></script> | |
5 <script src="network-test.js"></script> | |
6 <script> | |
7 | |
8 function performActions() | |
9 { | |
10 var xhr = new XMLHttpRequest(); | |
11 xhr.responseType = 'blob'; | |
caseq
2013/09/25 15:33:31
nit: we use double quotes on strings by default.
yusukesuzuki
2013/09/25 16:26:16
Done.
| |
12 xhr.open('GET', 'network/resources/resource.php', true); | |
13 xhr.onload = function () { }; // This is necessary for XHRLoad event. | |
14 xhr.onreadystatechange = function () { }; // This is necessary for XHRReady StateChange event. | |
15 xhr.send(null); | |
16 } | |
17 | |
18 function test() | |
19 { | |
20 InspectorTest.resetInspectorResourcesData(step1); | |
21 function step1() | |
22 { | |
23 InspectorTest.startTimeline(function() { | |
24 InspectorTest.evaluateInPage("performActions()"); | |
25 }); | |
26 | |
27 InspectorTest.waitForRecordType("XHRLoad", finish); | |
28 | |
29 function finish() | |
30 { | |
31 InspectorTest.printTimelineRecords("XHRReadyStateChange"); | |
32 InspectorTest.printTimelineRecords("XHRLoad"); | |
33 InspectorTest.completeTest(); | |
34 } | |
35 } | |
36 } | |
37 | |
38 </script> | |
39 </head> | |
40 | |
41 <body onload="runTest()"> | |
42 <p> | |
43 Tests the Timeline events for XMLHttpReqeust with responseType='blob' | |
44 </p> | |
45 | |
46 </body> | |
47 </html> | |
OLD | NEW |