Commit aab13661 authored by ap@apple.com's avatar ap@apple.com
Browse files

Reviewed by Darin Fisher.

        https://bugs.webkit.org/show_bug.cgi?id=32089
        Test that WebSocket.readyState is set correctly

        * websocket/tests/script-tests/simple.js:
        (ws.onopen):
        (ws.onmessage):
        (ws.onclose):
        * websocket/tests/simple-expected.txt:
        Added readyState logging.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a33973ba
2009-12-02 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Fisher.
https://bugs.webkit.org/show_bug.cgi?id=32089
Test that WebSocket.readyState is set correctly
* websocket/tests/script-tests/simple.js:
(ws.onopen):
(ws.onmessage):
(ws.onclose):
* websocket/tests/simple-expected.txt:
Added readyState logging.
2009-11-30 Julie Parent <jparent@chromium.org>
 
Reviewed by Darin Adler.
......@@ -14,20 +14,21 @@ function endTest()
}
var ws = new WebSocket("ws://localhost:8880/websocket/tests/simple");
debug("Created a socket to '" + ws.URL + "'; readyState = " + ws.readyState + ".");
ws.onopen = function()
{
debug("Connected.");
debug("Connected; readyState = " + ws.readyState + ".");
};
ws.onmessage = function(messageEvent)
{
debug("Received: '" + messageEvent.data + "'");
debug("Received: '" + messageEvent.data + "'; readyState = " + ws.readyState + ".");
};
ws.onclose = function()
{
debug("Closed.");
debug("Closed; readyState = " + ws.readyState + ".");
endTest();
};
......
......@@ -2,9 +2,10 @@ Simple Web Socket test
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Connected.
Received: 'Hello from Simple WSH.'
Closed.
Created a socket to 'ws://localhost:8880/websocket/tests/simple'; readyState = 0.
Connected; readyState = 1.
Received: 'Hello from Simple WSH.'; readyState = 1.
Closed; readyState = 2.
PASS successfullyParsed is true
TEST COMPLETE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment