Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / http / tests / inspector / websocket / timeline-websocket-event.html
1 <html>
2 <head>
3 <script src="/inspector/inspector-test.js"></script>
4 <script src="/inspector/timeline-test.js"></script>
5 <script>
6
7 function performActions()
8 {
9     var ws = new WebSocket("ws://127.0.0.1:8880/simple");
10
11     testRunner.display();
12 }
13
14 function test()
15 {
16     InspectorTest.startTimeline(function() {
17         InspectorTest.evaluateInPage("performActions()");
18     });
19
20     InspectorTest.waitForRecordType("WebSocketDestroy", finish);
21
22     function finish()
23     {
24         InspectorTest.printTimelineRecords("WebSocketCreate");
25         InspectorTest.printTimelineRecords("WebSocketSendHandshakeRequest");
26         InspectorTest.printTimelineRecords("WebSocketReceiveHandshakeResponse");
27         InspectorTest.printTimelineRecords("WebSocketDestroy");
28         InspectorTest.completeTest();
29     }
30 }
31
32 if (!window.testRunner)
33     setTimeout(performActions, 2000);
34
35 </script>
36 </head>
37
38 <body onload="runTest()">
39 <p>
40 Tests the Timeline events for WebSocket
41 </p>
42
43 </body>
44 </html>