| <title>test ws connection</title> |
| <script type="text/javascript"> |
| var href = window.location.href; |
| var queryBegin = href.indexOf('?url='); |
| console.log("Failed to find ?url= in URL"); |
| var url = href.slice(queryBegin + 5); |
| var ws = new WebSocket(url); |
| // Set document title to 'PASS'. The test observer catches this title changes |
| // Set document title to 'FAIL'. |
| ws.onmessage = function(evt) |
| domAutomationController.send(evt.data); |
| ws.onerror = function(evt) |
| console.error(`WebSocket error: '${evt.message}'`); |