Title: [147618] trunk
- Revision
- 147618
- Author
- [email protected]
- Date
- 2013-04-04 03:52:08 -0700 (Thu, 04 Apr 2013)
Log Message
[Qt] WebSocket errors should be logged to console
https://bugs.webkit.org/show_bug.cgi?id=113842
Patch by Seokju Kwon <[email protected]> on 2013-04-04
Reviewed by Jocelyn Turcotte.
Source/WebCore:
Pass the reason of a failure to SocketStreamError instance
and notify it via SocketStreamHandleClient::didFailSocketStream().
Test : http/tests/inspector/console-websocket-error.html
* platform/network/qt/SocketStreamError.h:
(WebCore::SocketStreamError::SocketStreamError):
* platform/network/qt/SocketStreamHandleQt.cpp:
(WebCore::SocketStreamHandlePrivate::SocketStreamHandlePrivate):
(WebCore::SocketStreamHandlePrivate::socketErrorCallback):
LayoutTests:
* platform/qt/TestExpectations:
* platform/qt/http/tests/inspector/console-websocket-error-expected.txt: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (147617 => 147618)
--- trunk/LayoutTests/ChangeLog 2013-04-04 10:47:46 UTC (rev 147617)
+++ trunk/LayoutTests/ChangeLog 2013-04-04 10:52:08 UTC (rev 147618)
@@ -1,3 +1,13 @@
+2013-04-04 Seokju Kwon <[email protected]>
+
+ [Qt] WebSocket errors should be logged to console
+ https://bugs.webkit.org/show_bug.cgi?id=113842
+
+ Reviewed by Jocelyn Turcotte.
+
+ * platform/qt/TestExpectations:
+ * platform/qt/http/tests/inspector/console-websocket-error-expected.txt: Added.
+
2013-04-04 Ádám Kallai <[email protected]>
[Qt] Unreviewed gardening.
Modified: trunk/LayoutTests/platform/qt/TestExpectations (147617 => 147618)
--- trunk/LayoutTests/platform/qt/TestExpectations 2013-04-04 10:47:46 UTC (rev 147617)
+++ trunk/LayoutTests/platform/qt/TestExpectations 2013-04-04 10:52:08 UTC (rev 147618)
@@ -2059,7 +2059,6 @@
fast/writing-mode/vertical-align-table-baseline.html
fast/writing-mode/vertical-baseline-alignment.html
fast/writing-mode/vertical-font-fallback.html
-http/tests/inspector/console-websocket-error.html
svg/as-image/animated-svg-repaints-completely-in-hidpi.html
transitions/default-timing-function.html
Added: trunk/LayoutTests/platform/qt/http/tests/inspector/console-websocket-error-expected.txt (0 => 147618)
--- trunk/LayoutTests/platform/qt/http/tests/inspector/console-websocket-error-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/qt/http/tests/inspector/console-websocket-error-expected.txt 2013-04-04 10:52:08 UTC (rev 147618)
@@ -0,0 +1,15 @@
+CONSOLE MESSAGE: line 32: testDNSLookup: Test started.
+CONSOLE MESSAGE: WebSocket network error: Host not found
+CONSOLE MESSAGE: line 43: testDNSLookup: onclose is called.
+CONSOLE MESSAGE: line 50: testSSLCertificate: Test started.
+CONSOLE MESSAGE: WebSocket network error: The host name did not match any of the valid hosts for this certificate
+CONSOLE MESSAGE: line 64: testSSLCertificate: onclose is called.
+WebSocket's network errors should be logged to console.
+
+testDNSLookup: Test started. console-websocket-error.html:32
+WebSocket network error: Host not found http://127.0.0.1:8000/inspector/console-websocket-error.html
+testDNSLookup: onclose is called. console-websocket-error.html:43
+testSSLCertificate: Test started. console-websocket-error.html:50
+WebSocket network error: The host name did not match any of the valid hosts for this certificate http://127.0.0.1:8000/inspector/console-websocket-error.html
+testSSLCertificate: onclose is called. console-websocket-error.html:64
+
Modified: trunk/Source/WebCore/ChangeLog (147617 => 147618)
--- trunk/Source/WebCore/ChangeLog 2013-04-04 10:47:46 UTC (rev 147617)
+++ trunk/Source/WebCore/ChangeLog 2013-04-04 10:52:08 UTC (rev 147618)
@@ -1,3 +1,21 @@
+2013-04-04 Seokju Kwon <[email protected]>
+
+ [Qt] WebSocket errors should be logged to console
+ https://bugs.webkit.org/show_bug.cgi?id=113842
+
+ Reviewed by Jocelyn Turcotte.
+
+ Pass the reason of a failure to SocketStreamError instance
+ and notify it via SocketStreamHandleClient::didFailSocketStream().
+
+ Test : http/tests/inspector/console-websocket-error.html
+
+ * platform/network/qt/SocketStreamError.h:
+ (WebCore::SocketStreamError::SocketStreamError):
+ * platform/network/qt/SocketStreamHandleQt.cpp:
+ (WebCore::SocketStreamHandlePrivate::SocketStreamHandlePrivate):
+ (WebCore::SocketStreamHandlePrivate::socketErrorCallback):
+
2013-04-04 Ed Bartosh <[email protected]>
[ATK] build fails when accessibility is turned off
Modified: trunk/Source/WebCore/platform/network/qt/SocketStreamError.h (147617 => 147618)
--- trunk/Source/WebCore/platform/network/qt/SocketStreamError.h 2013-04-04 10:47:46 UTC (rev 147617)
+++ trunk/Source/WebCore/platform/network/qt/SocketStreamError.h 2013-04-04 10:52:08 UTC (rev 147618)
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Seokju Kwon ([email protected])
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -42,7 +43,10 @@
: SocketStreamErrorBase(errorCode)
{
}
-
+ SocketStreamError(int errorCode, const QString& description)
+ : SocketStreamErrorBase(errorCode, String(), description)
+ {
+ }
};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp (147617 => 147618)
--- trunk/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp 2013-04-04 10:47:46 UTC (rev 147617)
+++ trunk/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp 2013-04-04 10:52:08 UTC (rev 147618)
@@ -35,6 +35,7 @@
#include "KURL.h"
#include "Logging.h"
#include "NotImplemented.h"
+#include "SocketStreamError.h"
#include "SocketStreamHandleClient.h"
#include "SocketStreamHandlePrivate.h"
@@ -167,6 +168,9 @@
if (m_streamHandle && m_streamHandle->client()) {
SocketStreamHandle* streamHandle = m_streamHandle;
m_streamHandle = 0;
+
+ streamHandle->client()->didFailSocketStream(streamHandle, SocketStreamError(error, m_socket->errorString()));
+
// This following call deletes _this_. Nothing should be after it.
streamHandle->client()->didCloseSocketStream(streamHandle);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes