diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-06-12 10:43:33 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-06-12 10:43:33 +0200 |
commit | d9995d954126fd6579f4373e021ef333efa2001e (patch) | |
tree | bfb40c99ddbfc048730317de006df4cbbaa77b39 | |
parent | 2212cacef2838129d8b303e0554b47020b6a31b7 (diff) | |
download | servo-d9995d954126fd6579f4373e021ef333efa2001e.tar.gz servo-d9995d954126fd6579f4373e021ef333efa2001e.zip |
Revert "Don't try to connect to "ws://"+location.host+"/" in WebSocket tests."
This reverts commit 61a9f9d7d449c04063c371a1ab353348446df8ce.
4 files changed, 11 insertions, 26 deletions
diff --git a/tests/wpt/web-platform-tests/websockets/constructor/002.html b/tests/wpt/web-platform-tests/websockets/constructor/002.html index 1acc2dbb82e..956cb1e9248 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(SCHEME_DOMAIN_PORT+"/#")})}); -test(function() {assert_throws("SyntaxError", function(){new WebSocket(SCHEME_DOMAIN_PORT+"/#test")})}); +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("?test")})}); test(function() {assert_throws("SyntaxError", function(){new WebSocket("#test")})}); </script> diff --git a/tests/wpt/web-platform-tests/websockets/constructor/004.html b/tests/wpt/web-platform-tests/websockets/constructor/004.html index 042caa1e589..a58fb3720ac 100644 --- a/tests/wpt/web-platform-tests/websockets/constructor/004.html +++ b/tests/wpt/web-platform-tests/websockets/constructor/004.html @@ -6,28 +6,18 @@ <div id=log></div> <script> // empty string -test(function() { - assert_throws("SyntaxError", function() { - new WebSocket(SCHEME_DOMAIN_PORT + '/empty-message', "") - }) -}); +test(function() {assert_throws("SyntaxError", function(){new WebSocket("ws://"+location.host+"/", "")})}); // chars below U+0020 except U+0000; U+0000 is tested in a separate test for (var i = 1; i < 0x20; ++i) { - test(function() { - assert_throws("SyntaxError", function() { - new WebSocket(SCHEME_DOMAIN_PORT + '/empty-message', - "a"+String.fromCharCode(i)+"b") - }, 'char code '+i); - }) +test(function() { + assert_throws("SyntaxError", function(){new WebSocket("ws://"+location.host+"/", "a"+String.fromCharCode(i)+"b")}, 'char code '+i); +}) } // some chars above U+007E for (var i = 0x7F; i < 0x100; ++i) { - test(function() { - assert_throws("SyntaxError", function() { - new WebSocket(SCHEME_DOMAIN_PORT + '/empty-message', - "a"+String.fromCharCode(i)+"b") - }, 'char code '+i); - }) +test(function() { + assert_throws("SyntaxError", function(){new WebSocket("ws://"+location.host+"/", "a"+String.fromCharCode(i)+"b")}, 'char code '+i); +}) } </script> diff --git a/tests/wpt/web-platform-tests/websockets/constructor/005.html b/tests/wpt/web-platform-tests/websockets/constructor/005.html index 58878b8a5fb..bb4d6d0f29a 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 @@ <div id=log></div> <script> test(function() { - assert_true(new WebSocket(SCHEME_DOMAIN_PORT + '/empty-message') instanceof WebSocket); + assert_true(new WebSocket("ws://"+location.host+"/") instanceof WebSocket); }); </script> diff --git a/tests/wpt/web-platform-tests/websockets/constructor/007.html b/tests/wpt/web-platform-tests/websockets/constructor/007.html index 9fcb07dc4d3..a3985cdcc6b 100644 --- a/tests/wpt/web-platform-tests/websockets/constructor/007.html +++ b/tests/wpt/web-platform-tests/websockets/constructor/007.html @@ -5,10 +5,5 @@ <script src=../constants.js?pipe=sub></script> <div id=log></div> <script> -test(function() { - assert_throws("SyntaxError", function() { - new WebSocket(SCHEME_DOMAIN_PORT + '/empty-message', - 'a' + String.fromCharCode(0) + 'b') - }) -}); +test(function() {assert_throws("SyntaxError", function(){new WebSocket("ws://"+location.host+"/", 'a'+String.fromCharCode(0)+'b')})}); </script> |