From 61a9f9d7d449c04063c371a1ab353348446df8ce Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 11 Jun 2015 20:11:50 +0200 Subject: [PATCH] Don't try to connect to "ws://"+location.host+"/" in WebSocket tests. This will connect on port 80, which is not typically under the control of the wpt server. --- .../websockets/constructor/002.html | 4 ++-- .../websockets/constructor/004.html | 24 +++++++++++++------ .../websockets/constructor/005.html | 2 +- .../websockets/constructor/007.html | 7 +++++- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/tests/wpt/web-platform-tests/websockets/constructor/002.html b/tests/wpt/web-platform-tests/websockets/constructor/002.html index 956cb1e9248..1acc2dbb82e 100644 --- a/tests/wpt/web-platform-tests/websockets/constructor/002.html +++ b/tests/wpt/web-platform-tests/websockets/constructor/002.html @@ -11,8 +11,8 @@ test(function() {assert_throws("SyntaxError", function(){new WebSocket("wss://fo test(function() {assert_throws("SyntaxError", function(){new WebSocket("http://"+location.host+"/")})}); test(function() {assert_throws("SyntaxError", function(){new WebSocket("mailto:example@example.org")})}); test(function() {assert_throws("SyntaxError", function(){new WebSocket("about:blank")})}); -test(function() {assert_throws("SyntaxError", function(){new WebSocket("ws://"+location.host+"/#")})}); -test(function() {assert_throws("SyntaxError", function(){new WebSocket("ws://"+location.host+"/#test")})}); +test(function() {assert_throws("SyntaxError", function(){new WebSocket(SCHEME_DOMAIN_PORT+"/#")})}); +test(function() {assert_throws("SyntaxError", function(){new WebSocket(SCHEME_DOMAIN_PORT+"/#test")})}); test(function() {assert_throws("SyntaxError", function(){new WebSocket("?test")})}); test(function() {assert_throws("SyntaxError", function(){new WebSocket("#test")})}); diff --git a/tests/wpt/web-platform-tests/websockets/constructor/004.html b/tests/wpt/web-platform-tests/websockets/constructor/004.html index a58fb3720ac..042caa1e589 100644 --- a/tests/wpt/web-platform-tests/websockets/constructor/004.html +++ b/tests/wpt/web-platform-tests/websockets/constructor/004.html @@ -6,18 +6,28 @@
diff --git a/tests/wpt/web-platform-tests/websockets/constructor/005.html b/tests/wpt/web-platform-tests/websockets/constructor/005.html index bb4d6d0f29a..58878b8a5fb 100644 --- a/tests/wpt/web-platform-tests/websockets/constructor/005.html +++ b/tests/wpt/web-platform-tests/websockets/constructor/005.html @@ -6,6 +6,6 @@
diff --git a/tests/wpt/web-platform-tests/websockets/constructor/007.html b/tests/wpt/web-platform-tests/websockets/constructor/007.html index a3985cdcc6b..9fcb07dc4d3 100644 --- a/tests/wpt/web-platform-tests/websockets/constructor/007.html +++ b/tests/wpt/web-platform-tests/websockets/constructor/007.html @@ -5,5 +5,10 @@