mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #6436 - Ms2ger:ws-test, r=nox
Don't try to connect to a non-existent WebSocket server on location.host:80. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6436) <!-- Reviewable:end -->
This commit is contained in:
commit
d2d51d4776
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