[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
abarth at webkit.org
abarth at webkit.org
Tue Jan 5 23:56:05 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit e9ae8c0dad923306815a6290589fea519962d3b4
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Dec 20 07:36:50 2009 +0000
2009-12-19 Adam Barth <abarth at webkit.org>
No review, rolling out r52399.
http://trac.webkit.org/changeset/52399
* websocket/tests/bad-sub-protocol-expected.txt:
* websocket/tests/script-tests/url-parsing.js:
* websocket/tests/url-parsing-expected.txt:
2009-12-19 Adam Barth <abarth at webkit.org>
No review, rolling out r52399.
http://trac.webkit.org/changeset/52399
* websockets/WebSocket.cpp:
(WebCore::WebSocket::connect):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d356fda..5b3bf4d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,5 +1,14 @@
2009-12-19 Adam Barth <abarth at webkit.org>
+ No review, rolling out r52399.
+ http://trac.webkit.org/changeset/52399
+
+ * websocket/tests/bad-sub-protocol-expected.txt:
+ * websocket/tests/script-tests/url-parsing.js:
+ * websocket/tests/url-parsing-expected.txt:
+
+2009-12-19 Adam Barth <abarth at webkit.org>
+
Reviewed by Eric Seidel.
Add a test for window.open and JavaScript URLs.
diff --git a/LayoutTests/websocket/tests/bad-sub-protocol-expected.txt b/LayoutTests/websocket/tests/bad-sub-protocol-expected.txt
index 32e0376..0c2fcde 100644
--- a/LayoutTests/websocket/tests/bad-sub-protocol-expected.txt
+++ b/LayoutTests/websocket/tests/bad-sub-protocol-expected.txt
@@ -1,14 +1,3 @@
-CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket
-CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket
-CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket
-CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket
-CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket
-CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket
-CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket あ
-CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket
-CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket
-CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket
-CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket 𠀋
Test WebSocket bad sub-protocol names.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
diff --git a/LayoutTests/websocket/tests/script-tests/url-parsing.js b/LayoutTests/websocket/tests/script-tests/url-parsing.js
index c46d9e1..6fdb037 100644
--- a/LayoutTests/websocket/tests/script-tests/url-parsing.js
+++ b/LayoutTests/websocket/tests/script-tests/url-parsing.js
@@ -1,22 +1,16 @@
description("Test WebSocket URL parsing.");
-// Invalid url will fail to be parsed.
-shouldThrow('new WebSocket("ws://javascript:a")');
-
// Can't use relative URLs - because spec says so, and because the scheme is different anyway.
shouldThrow('new WebSocket("/applet")');
-// Non ws URL is not allowed.
-shouldThrow('new WebSocket("javascript:a")');
-
// UA is allowed to block access to some ports, which we do.
shouldThrow('new WebSocket("ws://127.0.0.1:25/")');
-// Resolve the url string using the resolve a Web address algorithm.
-// Use 127.0.0.1:8880 and existing ws handler to make sure we don't receive unexpected response (so no console message appears)
-shouldBe('(new WebSocket("ws://127.0.0.1:8880/a/../websocket/tests/simple")).URL', '"ws://127.0.0.1:8880/websocket/tests/simple"');
-shouldBe('(new WebSocket("ws://127.0.0.1:8880/websocket/tests/simple?")).URL', '"ws://127.0.0.1:8880/websocket/tests/simple?"');
-shouldBe('(new WebSocket("ws://127.0.0.1:8880/websocket/tests/simple?k=v")).URL', '"ws://127.0.0.1:8880/websocket/tests/simple?k=v"');
+// This is what we currently do, but not what the spec says (as of Editor's Draft 1 December 2009).
+shouldBe('(new WebSocket("ws://127.0.0.1/a/../")).URL', '"ws://127.0.0.1/"');
+
+shouldBe('(new WebSocket("ws://127.0.0.1/path?")).URL', '"ws://127.0.0.1/path?"');
+shouldBe('(new WebSocket("ws://127.0.0.1/path?k=v")).URL', '"ws://127.0.0.1/path?k=v"');
// draft-hixie-thewebsocketprotocol-60 says If /url/ has a <fragment>
// component, then fail the parsing Web Socket URLs, so throw a SYNTAX_ERR
diff --git a/LayoutTests/websocket/tests/url-parsing-expected.txt b/LayoutTests/websocket/tests/url-parsing-expected.txt
index cbf44c3..80d7557 100644
--- a/LayoutTests/websocket/tests/url-parsing-expected.txt
+++ b/LayoutTests/websocket/tests/url-parsing-expected.txt
@@ -1,20 +1,12 @@
-CONSOLE MESSAGE: line 0: Invalid url for WebSocket ws://javascript:a
-CONSOLE MESSAGE: line 0: Wrong url scheme for WebSocket http://127.0.0.1:8880/applet
-CONSOLE MESSAGE: line 0: Wrong url scheme for WebSocket javascript:a
-CONSOLE MESSAGE: line 0: WebSocket port 25 blocked
-CONSOLE MESSAGE: line 0: URL has fragment component ws://127.0.0.1/path#
-CONSOLE MESSAGE: line 0: URL has fragment component ws://127.0.0.1/path#fragment
Test WebSocket URL parsing.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS new WebSocket("ws://javascript:a") threw exception Error: SYNTAX_ERR: DOM Exception 12.
PASS new WebSocket("/applet") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new WebSocket("javascript:a") threw exception Error: SYNTAX_ERR: DOM Exception 12.
PASS new WebSocket("ws://127.0.0.1:25/") threw exception Error: SECURITY_ERR: DOM Exception 18.
-PASS (new WebSocket("ws://127.0.0.1:8880/a/../websocket/tests/simple")).URL is "ws://127.0.0.1:8880/websocket/tests/simple"
-PASS (new WebSocket("ws://127.0.0.1:8880/websocket/tests/simple?")).URL is "ws://127.0.0.1:8880/websocket/tests/simple?"
-PASS (new WebSocket("ws://127.0.0.1:8880/websocket/tests/simple?k=v")).URL is "ws://127.0.0.1:8880/websocket/tests/simple?k=v"
+PASS (new WebSocket("ws://127.0.0.1/a/../")).URL is "ws://127.0.0.1/"
+PASS (new WebSocket("ws://127.0.0.1/path?")).URL is "ws://127.0.0.1/path?"
+PASS (new WebSocket("ws://127.0.0.1/path?k=v")).URL is "ws://127.0.0.1/path?k=v"
PASS new WebSocket("ws://127.0.0.1/path#") threw exception Error: SYNTAX_ERR: DOM Exception 12.
PASS new WebSocket("ws://127.0.0.1/path#fragment") threw exception Error: SYNTAX_ERR: DOM Exception 12.
PASS successfullyParsed is true
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3a110ee..7408b25 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,13 @@
2009-12-19 Adam Barth <abarth at webkit.org>
+ No review, rolling out r52399.
+ http://trac.webkit.org/changeset/52399
+
+ * websockets/WebSocket.cpp:
+ (WebCore::WebSocket::connect):
+
+2009-12-19 Adam Barth <abarth at webkit.org>
+
Reviewed by Eric Seidel.
Added a missing "not".
diff --git a/WebCore/websockets/WebSocket.cpp b/WebCore/websockets/WebSocket.cpp
index d4f16a2..ee78174 100644
--- a/WebCore/websockets/WebSocket.cpp
+++ b/WebCore/websockets/WebSocket.cpp
@@ -101,33 +101,26 @@ void WebSocket::connect(const KURL& url, const String& protocol, ExceptionCode&
m_url = url;
m_protocol = protocol;
- if (!m_url.isValid()) {
- scriptExecutionContext()->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Invalid url for WebSocket " + url.string(), 0, scriptExecutionContext()->securityOrigin()->toString());
- m_state = CLOSED;
- ec = SYNTAX_ERR;
- return;
- }
-
if (!m_url.protocolIs("ws") && !m_url.protocolIs("wss")) {
- scriptExecutionContext()->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Wrong url scheme for WebSocket " + url.string(), 0, scriptExecutionContext()->securityOrigin()->toString());
+ LOG(Network, "Wrong url scheme for WebSocket %s", url.string().utf8().data());
m_state = CLOSED;
ec = SYNTAX_ERR;
return;
}
if (m_url.hasFragmentIdentifier()) {
- scriptExecutionContext()->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "URL has fragment component " + url.string(), 0, scriptExecutionContext()->securityOrigin()->toString());
+ LOG(Network, "URL has fragment component %s", url.string().utf8().data());
m_state = CLOSED;
ec = SYNTAX_ERR;
return;
}
if (!isValidProtocolString(m_protocol)) {
- scriptExecutionContext()->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, "Wrong protocol for WebSocket " + m_protocol, 0, scriptExecutionContext()->securityOrigin()->toString());
+ LOG(Network, "Wrong protocol for WebSocket %s", m_protocol.utf8().data());
m_state = CLOSED;
ec = SYNTAX_ERR;
return;
}
if (!portAllowed(url)) {
- scriptExecutionContext()->addMessage(ConsoleDestination, JSMessageSource, LogMessageType, ErrorMessageLevel, String::format("WebSocket port %d blocked", url.port()), 0, scriptExecutionContext()->securityOrigin()->toString());
+ LOG(Network, "WebSocket port %d blocked", url.port());
m_state = CLOSED;
ec = SECURITY_ERR;
return;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list