Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
2011-05-24 Fumitoshi Ukai <ukai@chromium.org>
Reviewed by Adam Barth. close before open WebSocket doesn't fire close event. https://bugs.webkit.org/show_bug.cgi?id=57301 * http/tests/websocket/tests/close-before-open-expected.txt: Added. * http/tests/websocket/tests/close-before-open.html: Added. 2011-05-24 Fumitoshi Ukai <ukai@chromium.org> Reviewed by Adam Barth. close before open WebSocket doesn't fire close event. https://bugs.webkit.org/show_bug.cgi?id=57301 In platformClose(), m_readStream may be 0 until proxy is resolved. It should callback didClose() in such case. Test: http/tests/websocket/tests/close-before-open.html * platform/network/cf/SocketStreamHandleCFNet.cpp: (WebCore::SocketStreamHandle::platformClose): Canonical link: https://commits.webkit.org/76715@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
67 additions
and 1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,9 @@ | ||
Test if Web Socket fires close event when WebSocket is opened and closed fore open event is received. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
closed | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css"> | ||
<script src="../../../js-test-resources/js-test-pre.js"></script> | ||
<script src="../../../js-test-resources/js-test-post-function.js"></script> | ||
</head> | ||
<body> | ||
<div id="description"></div> | ||
<div id="console"></div> | ||
<script type="text/javascript"> | ||
description("Test if Web Socket fires close event when WebSocket is opened and closed fore open event is received."); | ||
|
||
if (window.layoutTestController) | ||
layoutTestController.waitUntilDone(); | ||
|
||
var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hanging-handshake"); | ||
ws.onclose = function() { | ||
debug("closed"); | ||
isSuccessfullyParsed(); | ||
if (window.layoutTestController) | ||
layoutTestController.notifyDone(); | ||
}; | ||
var successfullyParsed = true; | ||
ws.close(); | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters