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="/js-test-resources/js-test.js"></script> | 4 <script src="/js-test-resources/js-test.js"></script> |
5 <script> | 5 <script> |
6 var ws; | 6 var ws; |
7 function sendMessages() { | 7 function sendMessages() { |
8 ws = new WebSocket("ws://localhost:8880/echo"); | 8 ws = new WebSocket("ws://localhost:8880/echo"); |
9 ws.onopen = function() | 9 ws.onopen = function() |
10 { | 10 { |
(...skipping 22 matching lines...) Expand all Loading... |
33 } | 33 } |
34 if (JSON.stringify(frames) === JSON.stringify(previous_frames)) { | 34 if (JSON.stringify(frames) === JSON.stringify(previous_frames)) { |
35 // There is no update. | 35 // There is no update. |
36 return; | 36 return; |
37 } | 37 } |
38 for (var i = 0; i < frames.length; ++i) | 38 for (var i = 0; i < frames.length; ++i) |
39 InspectorTest.addResult(frames[i]); | 39 InspectorTest.addResult(frames[i]); |
40 if (done) | 40 if (done) |
41 InspectorTest.completeTest(); | 41 InspectorTest.completeTest(); |
42 } | 42 } |
43 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.Eve
ntTypes.RequestUpdated, onRequest); | 43 InspectorTest.networkManager.addEventListener(WebInspector.NetworkManager.Ev
entTypes.RequestUpdated, onRequest); |
44 InspectorTest.evaluateInPage("sendMessages()"); | 44 InspectorTest.evaluateInPage("sendMessages()"); |
45 } | 45 } |
46 </script> | 46 </script> |
47 </head> | 47 </head> |
48 <body onload="runTest()"> | 48 <body onload="runTest()"> |
49 <p>Tests that WebSocketFrames are being sent and received by Web Inspector.</p> | 49 <p>Tests that WebSocketFrames are being sent and received by Web Inspector.</p> |
50 </body> | 50 </body> |
51 </html> | 51 </html> |
OLD | NEW |