OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="/inspector/inspector-test.js"></script> | 3 <script src="/inspector/inspector-test.js"></script> |
4 <script src="/inspector/timeline-test.js"></script> | 4 <script src="/inspector/timeline-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 function performActions() | 7 function performActions() |
8 { | 8 { |
9 var ws = new WebSocket("ws://127.0.0.1:8880/simple"); | 9 var ws = new WebSocket("ws://127.0.0.1:8880/simple"); |
10 } | 10 } |
11 | 11 |
12 function test() | 12 function test() |
13 { | 13 { |
14 InspectorTest.startTimeline(function() { | 14 InspectorTest.startTimeline(function() { |
15 InspectorTest.evaluateInPage("performActions()"); | 15 InspectorTest.evaluateInPage("performActions()"); |
16 }); | 16 }); |
17 WebInspector.TimelineModel._doNotAssignEndTime = true; | |
18 | 17 |
19 InspectorTest.waitForRecordType("WebSocketDestroy", finish); | 18 InspectorTest.waitForRecordType("WebSocketDestroy", finish); |
20 | 19 |
21 function finish() | 20 function finish() |
22 { | 21 { |
23 InspectorTest.printTimelineRecords("WebSocketCreate"); | 22 InspectorTest.printTimelineRecords("WebSocketCreate"); |
24 InspectorTest.printTimelineRecords("WebSocketSendHandshakeRequest"); | 23 InspectorTest.printTimelineRecords("WebSocketSendHandshakeRequest"); |
25 InspectorTest.printTimelineRecords("WebSocketReceiveHandshakeResponse"); | 24 InspectorTest.printTimelineRecords("WebSocketReceiveHandshakeResponse"); |
26 InspectorTest.printTimelineRecords("WebSocketDestroy"); | 25 InspectorTest.printTimelineRecords("WebSocketDestroy"); |
27 InspectorTest.completeTest(); | 26 InspectorTest.completeTest(); |
28 } | 27 } |
29 } | 28 } |
30 | 29 |
31 if (!window.testRunner) | 30 if (!window.testRunner) |
32 setTimeout(performActions, 2000); | 31 setTimeout(performActions, 2000); |
33 | 32 |
34 </script> | 33 </script> |
35 </head> | 34 </head> |
36 | 35 |
37 <body onload="runTest()"> | 36 <body onload="runTest()"> |
38 <p> | 37 <p> |
39 Tests the Timeline events for WebSocket | 38 Tests the Timeline events for WebSocket |
40 </p> | 39 </p> |
41 | 40 |
42 </body> | 41 </body> |
43 </html> | 42 </html> |
OLD | NEW |