From e8d691aa03609832d549004e73457e562ff489c6 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/004.html.ini | 484 +++++++++++++++++- .../websockets/constructor/005.html.ini | 3 - .../websockets/constructor/007.html.ini | 4 +- .../websockets/constructor/002.html | 4 +- .../websockets/constructor/004.html | 24 +- .../websockets/constructor/005.html | 2 +- .../websockets/constructor/007.html | 7 +- 7 files changed, 512 insertions(+), 16 deletions(-) delete mode 100644 tests/wpt/metadata/websockets/constructor/005.html.ini diff --git a/tests/wpt/metadata/websockets/constructor/004.html.ini b/tests/wpt/metadata/websockets/constructor/004.html.ini index 58468cab4ee..96b6eb53ac1 100644 --- a/tests/wpt/metadata/websockets/constructor/004.html.ini +++ b/tests/wpt/metadata/websockets/constructor/004.html.ini @@ -1,3 +1,485 @@ [004.html] type: testharness - expected: CRASH + [WebSockets: new WebSocket(url, invalid protocol)] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 1] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 2] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 3] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 4] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 5] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 6] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 7] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 8] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 9] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 10] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 11] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 12] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 13] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 14] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 15] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 16] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 17] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 18] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 19] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 20] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 21] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 22] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 23] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 24] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 25] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 26] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 27] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 28] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 29] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 30] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 31] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 32] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 33] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 34] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 35] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 36] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 37] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 38] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 39] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 40] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 41] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 42] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 43] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 44] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 45] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 46] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 47] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 48] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 49] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 50] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 51] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 52] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 53] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 54] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 55] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 56] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 57] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 58] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 59] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 60] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 61] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 62] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 63] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 64] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 65] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 66] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 67] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 68] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 69] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 70] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 71] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 72] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 73] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 74] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 75] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 76] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 77] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 78] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 79] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 80] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 81] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 82] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 83] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 84] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 85] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 86] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 87] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 88] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 89] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 90] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 91] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 92] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 93] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 94] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 95] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 96] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 97] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 98] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 99] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 100] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 101] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 102] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 103] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 104] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 105] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 106] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 107] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 108] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 109] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 110] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 111] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 112] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 113] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 114] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 115] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 116] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 117] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 118] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 119] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 120] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 121] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 122] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 123] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 124] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 125] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 126] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 127] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 128] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 129] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 130] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 131] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 132] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 133] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 134] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 135] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 136] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 137] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 138] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 139] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 140] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 141] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 142] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 143] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 144] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 145] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 146] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 147] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 148] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 149] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 150] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 151] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 152] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 153] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 154] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 155] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 156] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 157] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 158] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 159] + expected: FAIL + + [WebSockets: new WebSocket(url, invalid protocol) 160] + expected: FAIL + diff --git a/tests/wpt/metadata/websockets/constructor/005.html.ini b/tests/wpt/metadata/websockets/constructor/005.html.ini deleted file mode 100644 index 3c0649a3bd8..00000000000 --- a/tests/wpt/metadata/websockets/constructor/005.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[005.html] - type: testharness - expected: CRASH diff --git a/tests/wpt/metadata/websockets/constructor/007.html.ini b/tests/wpt/metadata/websockets/constructor/007.html.ini index 323bf776b2e..da31c8e0253 100644 --- a/tests/wpt/metadata/websockets/constructor/007.html.ini +++ b/tests/wpt/metadata/websockets/constructor/007.html.ini @@ -1,3 +1,5 @@ [007.html] type: testharness - expected: CRASH + [WebSockets: new WebSocket(url, null char)] + expected: FAIL + 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 @@