Changeset 90099 in webkit
- Timestamp:
- Jun 30, 2011 2:22:49 AM (13 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r90097 r90099 1 2011-06-30 Yuta Kitamura <yutak@chromium.org> 2 3 Reviewed by Kent Tamura. 4 5 WebSocket: Fix style issues of pywebsocket handlers 6 https://bugs.webkit.org/show_bug.cgi?id=63689 7 8 Fix minor style errors such as wrong indentation or wrong number of blank lines. 9 10 * http/tests/websocket/tests/bad-handshake-crash_wsh.py: 11 * http/tests/websocket/tests/close-on-unload_wsh.py: 12 * http/tests/websocket/tests/echo-challenge_wsh.py: 13 * http/tests/websocket/tests/echo-cookie_wsh.py: 14 * http/tests/websocket/tests/frame-length-longer-than-buffer_wsh.py: 15 * http/tests/websocket/tests/frame-length-overflow_wsh.py: 16 * http/tests/websocket/tests/frame-length-skip_wsh.py: 17 * http/tests/websocket/tests/handshake-fail-by-maxlength_wsh.py: 18 Use sequence repetition pattern instead of a loop. 19 * http/tests/websocket/tests/handshake-fail-by-no-connection-header_wsh.py: 20 * http/tests/websocket/tests/handshake-fail-by-no-cr_wsh.py: 21 * http/tests/websocket/tests/handshake-fail-by-no-upgrade-header_wsh.py: 22 * http/tests/websocket/tests/handshake-fail-by-prepended-null_wsh.py: 23 * http/tests/websocket/tests/hanging-handshake_wsh.py: 24 * http/tests/websocket/tests/long-invalid-header_wsh.py: 25 * http/tests/websocket/tests/send2_wsh.py: 26 * http/tests/websocket/tests/unknown-frame-type_wsh.py: 27 * http/tests/websocket/tests/workers/resources/echo-challenge_wsh.py: 28 1 29 2011-06-30 Kent Tamura <tkent@chromium.org> 2 30 -
trunk/LayoutTests/http/tests/websocket/tests/bad-handshake-crash_wsh.py
r57760 r90099 1 1 def web_socket_do_extra_handshake(request): 2 msg = "HTTP/1.1 101 Web Socket Protocol Handshake\r\n" 3 msg += "Upgrade: WebSocket\r\n" 4 msg += "Connection: Upgrade\r\n" 5 msg += "\xa5:\r\n" 6 msg += "\r\n" 7 request.connection.write(msg) 8 print msg 2 msg = "HTTP/1.1 101 Web Socket Protocol Handshake\r\n" 3 msg += "Upgrade: WebSocket\r\n" 4 msg += "Connection: Upgrade\r\n" 5 msg += "\xa5:\r\n" 6 msg += "\r\n" 7 request.connection.write(msg) 8 print msg 9 9 10 10 11 def web_socket_transfer_data(request): 11 pass12 pass -
trunk/LayoutTests/http/tests/websocket/tests/close-on-unload_wsh.py
r54404 r90099 31 31 from mod_pywebsocket import msgutil 32 32 33 33 34 # we don't use set() here, because python on mac tiger doesn't support it. 34 35 connections = {} 36 35 37 36 38 def web_socket_do_extra_handshake(request): … … 53 55 for ws in connections.keys(): 54 56 msgutil.send_message(ws, socketName) 55 -
trunk/LayoutTests/http/tests/websocket/tests/echo-challenge_wsh.py
r63298 r90099 1 1 from mod_pywebsocket import msgutil 2 2 3 3 4 def web_socket_do_extra_handshake(request): 4 5 pass 5 6 7 6 8 def web_socket_transfer_data(request): 7 9 msgutil.send_message(request, _hexify(request.ws_challenge)) 8 10 11 9 12 def _hexify(bytes): 10 13 return ':'.join(['%02X' % ord(byte) for byte in bytes]) -
trunk/LayoutTests/http/tests/websocket/tests/echo-cookie_wsh.py
r55719 r90099 30 30 from mod_pywebsocket import msgutil 31 31 32 32 33 def web_socket_do_extra_handshake(request): 33 34 pass 34 35 36 35 37 def web_socket_transfer_data(request): 36 38 msgutil.send_message(request, request.headers_in['Cookie']) -
trunk/LayoutTests/http/tests/websocket/tests/frame-length-longer-than-buffer_wsh.py
r87674 r90099 1 1 def web_socket_do_extra_handshake(request): 2 2 pass 3 3 4 4 5 def web_socket_transfer_data(request): -
trunk/LayoutTests/http/tests/websocket/tests/frame-length-overflow_wsh.py
r65135 r90099 1 1 def web_socket_do_extra_handshake(request): 2 pass 2 pass 3 3 4 4 5 def web_socket_transfer_data(request): 5 msg = 16 * '\xff'6 request.connection.write(msg)6 msg = 16 * '\xff' 7 request.connection.write(msg) -
trunk/LayoutTests/http/tests/websocket/tests/frame-length-skip_wsh.py
r51829 r90099 1 1 def web_socket_do_extra_handshake(request): 2 pass 2 pass 3 3 4 4 5 def web_socket_transfer_data(request): 5 msg = "\0hello\xff"6 msg += "\x80\x81\x01" # skip 1*128+1 bytes.7 msg += "\x01"8 msg += "\0should be skipped" + (" " * 109) + "\xff"9 msg += "\0world\xff"10 request.connection.write(msg)11 print msg6 msg = "\0hello\xff" 7 msg += "\x80\x81\x01" # skip 1*128+1 bytes. 8 msg += "\x01" 9 msg += "\0should be skipped" + (" " * 109) + "\xff" 10 msg += "\0world\xff" 11 request.connection.write(msg) 12 print msg -
trunk/LayoutTests/http/tests/websocket/tests/handshake-fail-by-maxlength_wsh.py
r75461 r90099 22 22 import time 23 23 24 24 25 def web_socket_do_extra_handshake(request): 25 26 # This will cause the handshake to fail because it pushes the length of the 26 27 # status line past 1024 characters 27 msg = "" 28 for i in range(0, 1024): 29 msg += "." 28 msg = '.' * 1024 30 29 msg += 'HTTP/1.1 101 WebSocket Protocol Handshake\r\n' 31 30 msg += 'Upgrade: WebSocket\r\n' … … 41 40 request.connection.write('keepalive\n') 42 41 42 43 43 def web_socket_transfer_data(request): 44 44 pass -
trunk/LayoutTests/http/tests/websocket/tests/handshake-fail-by-no-connection-header_wsh.py
r80252 r90099 10 10 print msg 11 11 12 12 13 def web_socket_transfer_data(request): 13 14 pass -
trunk/LayoutTests/http/tests/websocket/tests/handshake-fail-by-no-cr_wsh.py
r61671 r90099 10 10 print msg 11 11 12 12 13 def web_socket_transfer_data(request): 13 14 pass -
trunk/LayoutTests/http/tests/websocket/tests/handshake-fail-by-no-upgrade-header_wsh.py
r80252 r90099 10 10 print msg 11 11 12 12 13 def web_socket_transfer_data(request): 13 14 pass -
trunk/LayoutTests/http/tests/websocket/tests/handshake-fail-by-prepended-null_wsh.py
r75461 r90099 21 21 22 22 import time 23 23 24 24 25 def web_socket_do_extra_handshake(request): … … 46 47 request.connection.write(frame) 47 48 49 48 50 def web_socket_transfer_data(request): 49 51 pass -
trunk/LayoutTests/http/tests/websocket/tests/hanging-handshake_wsh.py
r82088 r90099 2 2 request.connection.read() 3 3 4 4 5 def web_socket_transfer_data(request): 5 6 pass 6 -
trunk/LayoutTests/http/tests/websocket/tests/long-invalid-header_wsh.py
r56380 r90099 1 1 def web_socket_do_extra_handshake(request): 2 msg = "HTTP/1.1 101 Web Socket Protocol Handshake\r\n" 3 msg += ("p" * 1024) + "\r\n" 4 request.connection.write(msg) 2 msg = "HTTP/1.1 101 Web Socket Protocol Handshake\r\n" 3 msg += ("p" * 1024) + "\r\n" 4 request.connection.write(msg) 5 5 6 6 7 def web_socket_transfer_data(request): 7 msg = "HTTP/1.1 101 Web Socket Protocol Handshake\r\n"8 msg += ("p" * 1024) + "\r\n"9 request.connection.write(msg)8 msg = "HTTP/1.1 101 Web Socket Protocol Handshake\r\n" 9 msg += ("p" * 1024) + "\r\n" 10 request.connection.write(msg) -
trunk/LayoutTests/http/tests/websocket/tests/send2_wsh.py
r61375 r90099 1 1 def web_socket_do_extra_handshake(request): 2 2 pass # Always accept. 3 3 4 4 5 def web_socket_transfer_data(request): -
trunk/LayoutTests/http/tests/websocket/tests/unknown-frame-type_wsh.py
r55573 r90099 1 1 from mod_pywebsocket import msgutil 2 2 3 3 4 def web_socket_do_extra_handshake(request): 4 5 pass 6 5 7 6 8 def web_socket_transfer_data(request): -
trunk/LayoutTests/http/tests/websocket/tests/workers/resources/echo-challenge_wsh.py
r63524 r90099 1 1 from mod_pywebsocket import msgutil 2 2 3 3 4 def web_socket_do_extra_handshake(request): 4 5 pass 5 6 7 6 8 def web_socket_transfer_data(request): 7 9 msgutil.send_message(request, _hexify(request.ws_challenge)) 8 10 11 9 12 def _hexify(bytes): 10 13 return ':'.join(['%02X' % ord(byte) for byte in bytes])
Note: See TracChangeset
for help on using the changeset viewer.