⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 94052 in webkit


Ignore:
Timestamp:
Aug 29, 2011, 11:37:56 PM (15 years ago)
Author:
commit-queue@webkit.org
Message:

Fix two layout tests which fails on Qt port with latest pywebsocket.
https://bugs.webkit.org/show_bug.cgi?id=66929

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

hanging-handshake_wsh.py read socket to hang in opening handshake.
Then client initiated closing handshakes or abnormal closures caused
exception or resulted in http error response on hybi-10 compliant new
pywebsocket. Because tests finished at closure, it depends on timing
whether tests detects the error response. Actually, two tests failed on
Qt port by chance.
Essentially, hangings is unnecessary because open event must be queued
and WebSocket's readyState could not be changed to OPEN until the next
event loop is executed. That's why we can use echo_wsh.py instead of
hanging-handshake_wsh.py safely.

close-unref-websocket tests call close() before GC. These tests expect
GC cause close event. But close() itself also queues close event.
These close() are redandant. If GC doesn't cause close event, these
tests can pass by close event that close() queues. This change also
remove these redandant close() calls.

  • http/tests/websocket/tests/hixie76/close-before-open.html:

Use echo_wsh.py instead of hanging-handshake_wsh.py.

  • http/tests/websocket/tests/hixie76/close-unref-websocket-expected.txt:
  • http/tests/websocket/tests/hixie76/close-unref-websocket.html:

Used echo_wsh.py, remove ws.close() and fix expectation.

  • http/tests/websocket/tests/hixie76/hanging-handshake_wsh.py: Removed.
  • http/tests/websocket/tests/hybi/close-before-open.html:

Use echo_wsh.py instead of hanging-handshake_wsh.py.

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

Used echo_wsh.py, remove ws.close() and fix expectation.

  • http/tests/websocket/tests/hybi/hanging-handshake_wsh.py: Removed.
  • http/tests/websocket/tests/hybi/close-code-and-reason.html:
  • http/tests/websocket/tests/hybi/workers/resources/close-code-and-reason.js:

Use echo_wsh.py instead of hanging-handshake_wsh.py.

Location:
trunk/LayoutTests
Files:
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r94048 r94052  
     12011-08-29  Takashi Toyoshima  <toyoshim@chromium.org>
     2
     3        Fix two layout tests which fails on Qt port with latest pywebsocket.
     4        https://bugs.webkit.org/show_bug.cgi?id=66929
     5
     6        Reviewed by Kent Tamura.
     7
     8        hanging-handshake_wsh.py read socket to hang in opening handshake.
     9        Then client initiated closing handshakes or abnormal closures caused
     10        exception or resulted in http error response on hybi-10 compliant new
     11        pywebsocket. Because tests finished at closure, it depends on timing
     12        whether tests detects the error response. Actually, two tests failed on
     13        Qt port by chance.
     14        Essentially, hangings is unnecessary because open event must be queued
     15        and WebSocket's readyState could not be changed to OPEN until the next
     16        event loop is executed. That's why we can use echo_wsh.py instead of
     17        hanging-handshake_wsh.py safely.
     18
     19        close-unref-websocket tests call close() before GC. These tests expect
     20        GC cause close event. But close() itself also queues close event.
     21        These close() are redandant. If GC doesn't cause close event, these
     22        tests can pass by close event that close() queues. This change also
     23        remove these redandant close() calls.
     24
     25        * http/tests/websocket/tests/hixie76/close-before-open.html:
     26        Use echo_wsh.py instead of hanging-handshake_wsh.py.
     27        * http/tests/websocket/tests/hixie76/close-unref-websocket-expected.txt:
     28        * http/tests/websocket/tests/hixie76/close-unref-websocket.html:
     29        Used echo_wsh.py, remove ws.close() and fix expectation.
     30        * http/tests/websocket/tests/hixie76/hanging-handshake_wsh.py: Removed.
     31        * http/tests/websocket/tests/hybi/close-before-open.html:
     32        Use echo_wsh.py instead of hanging-handshake_wsh.py.
     33        * http/tests/websocket/tests/hybi/close-unref-websocket-expected.txt:
     34        * http/tests/websocket/tests/hybi/close-unref-websocket.html:
     35        Used echo_wsh.py, remove ws.close() and fix expectation.
     36        * http/tests/websocket/tests/hybi/hanging-handshake_wsh.py: Removed.
     37        * http/tests/websocket/tests/hybi/close-code-and-reason.html:
     38        * http/tests/websocket/tests/hybi/workers/resources/close-code-and-reason.js:
     39        Use echo_wsh.py instead of hanging-handshake_wsh.py.
     40
    1412011-08-29  MORITA Hajime  <morrita@google.com>
    242
  • trunk/LayoutTests/http/tests/websocket/tests/hixie76/close-before-open.html

    r90445 r94052  
    1313window.jsTestIsAsync = true;
    1414
    15 var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/hanging-handshake");
     15var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/echo");
    1616ws.onclose = function() {
    1717    debug("closed");
  • trunk/LayoutTests/http/tests/websocket/tests/hixie76/close-unref-websocket-expected.txt

    r90445 r94052  
    1 CONSOLE MESSAGE: line 0: WebSocket is closed before the connection is established.
    21Test if Web Socket is closed while handshaking and unreferenced, it should fire close event at most once.
    32
  • trunk/LayoutTests/http/tests/websocket/tests/hixie76/close-unref-websocket.html

    r90445 r94052  
    2121};
    2222
    23 var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/hanging-handshake");
     23var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/echo");
    2424ws.onclose = function() {
    2525    countCloseEvent += 1;
    2626};
    27 ws.close();
    2827ws = null;
    2928gc();
  • trunk/LayoutTests/http/tests/websocket/tests/hybi/close-before-open.html

    r93505 r94052  
    1616
    1717var urls = [
    18     "ws://127.0.0.1:8880/websocket/tests/hybi/hanging-handshake",
     18    "ws://127.0.0.1:8880/websocket/tests/hybi/echo",
    1919    "ws://127.0.0.1:8880/websocket/tests/hybi/close-code-and-reason"
    2020];
  • trunk/LayoutTests/http/tests/websocket/tests/hybi/close-code-and-reason.html

    r93393 r94052  
    2020var emptyString = "";
    2121
    22 var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hybi/hanging-handshake");
     22var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hybi/echo");
    2323
    2424ws.onopen = function(event)
  • trunk/LayoutTests/http/tests/websocket/tests/hybi/close-unref-websocket-expected.txt

    r90726 r94052  
    1 CONSOLE MESSAGE: line 0: WebSocket is closed before the connection is established.
    21Test if Web Socket is closed while handshaking and unreferenced, it should fire close event at most once.
    32
  • trunk/LayoutTests/http/tests/websocket/tests/hybi/close-unref-websocket.html

    r90726 r94052  
    2323};
    2424
    25 var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hybi/hanging-handshake");
     25var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hybi/echo");
    2626ws.onclose = function() {
    2727    countCloseEvent += 1;
    2828};
    29 ws.close();
    3029ws = null;
    3130gc();
  • trunk/LayoutTests/http/tests/websocket/tests/hybi/workers/resources/close-code-and-reason.js

    r93393 r94052  
    1313}
    1414
    15 var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hybi/hanging-handshake");
     15var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hybi/echo");
    1616
    1717ws.onopen = function(event)
Note: See TracChangeset for help on using the changeset viewer.