Fix two layout tests which fails on Qt port with latest pywebsocket.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Aug 2011 06:37:56 +0000 (06:37 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Aug 2011 06:37:56 +0000 (06:37 +0000)
commit2743eceec6f1480079cdf8847faac4b859ec75d5
tree17e94b835bfe6ac557fb46b38079852e6e732027
parente7b5a5407edf33594cfc205bb0ede345afc87419
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@94052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/websocket/tests/hixie76/close-before-open.html
LayoutTests/http/tests/websocket/tests/hixie76/close-unref-websocket-expected.txt
LayoutTests/http/tests/websocket/tests/hixie76/close-unref-websocket.html
LayoutTests/http/tests/websocket/tests/hixie76/hanging-handshake_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hybi/close-before-open.html
LayoutTests/http/tests/websocket/tests/hybi/close-code-and-reason.html
LayoutTests/http/tests/websocket/tests/hybi/close-unref-websocket-expected.txt
LayoutTests/http/tests/websocket/tests/hybi/close-unref-websocket.html
LayoutTests/http/tests/websocket/tests/hybi/hanging-handshake_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hybi/workers/resources/close-code-and-reason.js