mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Don't try to connect to a non-existent WebSocket server on location.host:80.
This commit is contained in:
parent
02303941be
commit
deef342ed8
1 changed files with 7 additions and 2 deletions
|
@ -5,9 +5,14 @@
|
|||
<script src=../constants.js?pipe=sub></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
var tests = ['ws:', 'ws:/', 'wss:', 'wss:/'];
|
||||
var tests = [
|
||||
['ws:', PORT],
|
||||
['ws:/', PORT],
|
||||
['wss:', PORT_SSL],
|
||||
['wss:/', PORT_SSL]
|
||||
];
|
||||
//Pass condition is to not throw
|
||||
for (var i = 0; i < tests.length; ++i) {
|
||||
test(function(){new WebSocket(tests[i]+location.host+'/echo')}, tests[i]);
|
||||
test(function(){new WebSocket(tests[i][0] + location.host + ':' + tests[i][1] + '/echo')}, tests[i][0]);
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue