Changeset 93505 in webkit


Ignore:
Timestamp:
Aug 22, 2011 5:06:38 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[Chromium] [WebSocket] Add a test to reproduce chromium bug on close before open.
https://bugs.webkit.org/show_bug.cgi?id=66649

Patch by Takashi Toyoshima <toyoshim@chromium.org> on 2011-08-22
Reviewed by Kent Tamura.

  • http/tests/websocket/tests/hybi/close-before-open-expected.txt:
  • http/tests/websocket/tests/hybi/close-before-open.html:

Add new URL to reproduce the problem.

Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r93501 r93505  
     12011-08-22  Takashi Toyoshima  <toyoshim@chromium.org>
     2
     3        [Chromium] [WebSocket] Add a test to reproduce chromium bug on close before open.
     4        https://bugs.webkit.org/show_bug.cgi?id=66649
     5
     6        Reviewed by Kent Tamura.
     7
     8        * http/tests/websocket/tests/hybi/close-before-open-expected.txt:
     9        * http/tests/websocket/tests/hybi/close-before-open.html:
     10        Add new URL to reproduce the problem.
     11
    1122011-08-18  Pavel Podivilov  <podivilov@chromium.org>
    213
  • trunk/LayoutTests/http/tests/websocket/tests/hybi/close-before-open-expected.txt

    r90726 r93505  
     1CONSOLE MESSAGE: line 0: WebSocket is closed before the connection is established.
    12CONSOLE MESSAGE: line 0: WebSocket is closed before the connection is established.
    23Test if Web Socket fires close event when WebSocket is opened and closed fore open event is received.
     
    45On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
    56
    6 closed
     7closed on test 1
     8closed on test 2
    79PASS successfullyParsed is true
    810
  • trunk/LayoutTests/http/tests/websocket/tests/hybi/close-before-open.html

    r90726 r93505  
    1515    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 0);
    1616
    17 var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hybi/hanging-handshake");
    18 ws.onclose = function() {
    19     debug("closed");
    20     finishJSTest();
     17var urls = [
     18    "ws://127.0.0.1:8880/websocket/tests/hybi/hanging-handshake",
     19    "ws://127.0.0.1:8880/websocket/tests/hybi/close-code-and-reason"
     20];
     21
     22var testId = 0;
     23
     24var test = function() {
     25    if (0 != testId)
     26        debug("closed on test " + testId);
     27    if (2 == testId)
     28        finishJSTest();
     29    else {
     30        ws = new WebSocket(urls[testId++]);
     31        ws.onclose = test;
     32        ws.close();
     33    }
    2134};
     35
     36test();
     37
    2238var successfullyParsed = true;
    23 ws.close();
    2439</script>
    2540<script src="../../../../js-test-resources/js-test-post.js"></script>
Note: See TracChangeset for help on using the changeset viewer.