Changeset 94057 in webkit
- Timestamp:
- Aug 30, 2011, 1:02:59 AM (15 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 20 edited
-
ChangeLog (modified) (1 diff)
-
http/tests/websocket/tests/hixie76/bad-handshake-crash_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hixie76/frame-length-longer-than-buffer_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hixie76/frame-length-overflow_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hixie76/handshake-fail-by-maxlength_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hixie76/handshake-fail-by-no-connection-header_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hixie76/handshake-fail-by-no-cr_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hixie76/handshake-fail-by-no-upgrade-header_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hixie76/handshake-fail-by-prepended-null_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hixie76/long-invalid-header_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hybi/handshake-fail-by-maxlength_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hybi/handshake-fail-by-no-accept-header_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hybi/handshake-fail-by-wrong-accept-header_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hybi/long-invalid-header_wsh.py (modified) (2 diffs)
-
http/tests/websocket/tests/hybi/masked-frames_wsh.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r94052 r94057 1 2011-08-30 Takashi Toyoshima <toyoshim@chromium.org> 2 3 [WebSocket] Prevent unnecessary pywebsocket warnings on layout tests. 4 https://bugs.webkit.org/show_bug.cgi?id=67182 5 6 Reviewed by Kent Tamura. 7 8 Some layout tests for WebSocket raised Exception to prevent unnecessary 9 pywebsocket warning. But it doesn't work any more on pywebsocket 0.6b4. 10 Now pywebsocket support AbortedByUserException to prevent warning. 11 This change make raise AbortedByUserException instead of Exception. 12 13 handshake-fail-by-prepended-null_wsh.py didn't use Exception, but 14 expected abnormal closure on sending response could raise unexpected 15 Exception by chance. This change also takes care of it. 16 17 * http/tests/websocket/tests/hixie76/bad-handshake-crash_wsh.py: 18 * http/tests/websocket/tests/hixie76/frame-length-longer-than-buffer_wsh.py: 19 * http/tests/websocket/tests/hixie76/frame-length-overflow_wsh.py: 20 * http/tests/websocket/tests/hixie76/handshake-fail-by-maxlength_wsh.py: 21 * http/tests/websocket/tests/hixie76/handshake-fail-by-no-connection-header_wsh.py: 22 * http/tests/websocket/tests/hixie76/handshake-fail-by-no-cr_wsh.py: 23 * http/tests/websocket/tests/hixie76/handshake-fail-by-no-upgrade-header_wsh.py: 24 * http/tests/websocket/tests/hixie76/handshake-fail-by-prepended-null_wsh.py: 25 * http/tests/websocket/tests/hixie76/long-invalid-header_wsh.py: 26 * http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py: 27 * http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header_wsh.py: 28 * http/tests/websocket/tests/hybi/handshake-fail-by-maxlength_wsh.py: 29 * http/tests/websocket/tests/hybi/handshake-fail-by-no-accept-header_wsh.py: 30 * http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py: 31 * http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py: 32 * http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py: 33 * http/tests/websocket/tests/hybi/handshake-fail-by-wrong-accept-header_wsh.py: 34 * http/tests/websocket/tests/hybi/long-invalid-header_wsh.py: 35 * http/tests/websocket/tests/hybi/masked-frames_wsh.py: 36 Use AbortedByUserException instead of Exception. 37 1 38 2011-08-29 Takashi Toyoshima <toyoshim@chromium.org> 2 39 -
trunk/LayoutTests/http/tests/websocket/tests/hixie76/bad-handshake-crash_wsh.py
r90445 r94057 1 from mod_pywebsocket import handshake 2 3 1 4 def web_socket_do_extra_handshake(request): 2 5 msg = "HTTP/1.1 101 WebSocket Protocol Handshake\r\n" … … 10 13 request.connection.write(msg) 11 14 print msg 12 raise Exception("Abort the connection") # Prevents pywebsocket from sending its own handshake message.15 raise handshake.AbortedByUserException("Abort the connection") # Prevents pywebsocket from sending its own handshake message. 13 16 14 17 -
trunk/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-longer-than-buffer_wsh.py
r90445 r94057 1 from mod_pywebsocket import handshake 2 3 1 4 def web_socket_do_extra_handshake(request): 2 5 pass … … 9 12 msg += "\0should be skipped\xff" 10 13 request.connection.write(msg) 11 raise Exception("Abort the connection") # Prevents pywebsocket from starting closing handshake.14 raise handshake.AbortedByUserException("Abort the connection") # Prevents pywebsocket from starting closing handshake. -
trunk/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-overflow_wsh.py
r90445 r94057 1 from mod_pywebsocket import handshake 2 3 1 4 def web_socket_do_extra_handshake(request): 2 5 pass … … 6 9 msg = 16 * '\xff' 7 10 request.connection.write(msg) 8 raise Exception('Abort the connection') # Prevents pywebsocket from starting closing handshake.11 raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from starting closing handshake. -
trunk/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-maxlength_wsh.py
r90445 r94057 21 21 22 22 23 from mod_pywebsocket import handshake 24 25 23 26 def web_socket_do_extra_handshake(request): 24 27 # This will cause the handshake to fail because it pushes the length of the … … 33 36 msg += request.ws_challenge_md5 34 37 request.connection.write(msg) 35 raise Exception('abort the connection') # Prevents pywebsocket from sending its own handshake message.38 raise handshake.AbortedByUserException('abort the connection') # Prevents pywebsocket from sending its own handshake message. 36 39 37 40 -
trunk/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-connection-header_wsh.py
r90445 r94057 1 from mod_pywebsocket import handshake 2 3 1 4 def web_socket_do_extra_handshake(request): 2 5 msg = 'HTTP/1.1 101 WebSocket Protocol Handshake\r\n' … … 9 12 request.connection.write(msg) 10 13 print msg 11 raise Exception('Abort the connection') # Prevents pywebsocket from sending its own handshake message.14 raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message. 12 15 13 16 -
trunk/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-cr_wsh.py
r90445 r94057 1 from mod_pywebsocket import handshake 2 3 1 4 def web_socket_do_extra_handshake(request): 2 5 msg = 'HTTP/1.1 101 WebSocket Protocol Handshake\n' # Does not end with "\r\n". … … 9 12 request.connection.write(msg) 10 13 print msg 11 raise Exception('Abort the connection') # Prevents pywebsocket from sending its own handshake message.14 raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message. 12 15 13 16 -
trunk/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-upgrade-header_wsh.py
r90445 r94057 1 from mod_pywebsocket import handshake 2 3 1 4 def web_socket_do_extra_handshake(request): 2 5 msg = 'HTTP/1.1 101 WebSocket Protocol Handshake\r\n' … … 9 12 request.connection.write(msg) 10 13 print msg 11 raise Exception('Abort the connection') # Prevents pywebsocket from sending its own handshake message.14 raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message. 12 15 13 16 -
trunk/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-prepended-null_wsh.py
r90445 r94057 21 21 22 22 import time 23 from mod_pywebsocket import handshake 23 24 24 25 … … 45 46 numFrames = 1024 / len(frame) # write over 1024 bytes including the above handshake 46 47 for i in range(0, numFrames): 47 request.connection.write(frame) 48 try: 49 request.connection.write(frame) 50 except Exception, e: 51 raise handshake.AbortedByUserException(e) 48 52 49 53 -
trunk/LayoutTests/http/tests/websocket/tests/hixie76/long-invalid-header_wsh.py
r90445 r94057 1 from mod_pywebsocket import handshake 2 3 1 4 def web_socket_do_extra_handshake(request): 2 5 msg = "HTTP/1.1 101 WebSocket Protocol Handshake\r\n" … … 5 8 msg += request.ws_challenge_md5 6 9 request.connection.write(msg) 7 raise Exception("Abort the connection") # Prevents pywebsocket from sending its own handshake message.10 raise handshake.AbortedByUserException("Abort the connection") # Prevents pywebsocket from sending its own handshake message. 8 11 9 12 -
trunk/LayoutTests/http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py
r91052 r94057 1 from mod_pywebsocket import handshake 1 2 from mod_pywebsocket.handshake.hybi import compute_accept 2 3 … … 11 12 request.connection.write(msg) 12 13 print msg 13 raise Exception("Abort the connection") # Prevents pywebsocket from sending its own handshake message.14 raise handshake.AbortedByUserException("Abort the connection") # Prevents pywebsocket from sending its own handshake message. 14 15 15 16 -
trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header_wsh.py
r91052 r94057 1 from mod_pywebsocket import handshake 1 2 from mod_pywebsocket.handshake.hybi import compute_accept 2 3 … … 10 11 message += '\r\n' 11 12 request.connection.write(message) 12 raise Exception('Abort the connection') # Prevents pywebsocket from sending its own handshake message.13 raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message. 13 14 14 15 -
trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-maxlength_wsh.py
r91052 r94057 21 21 22 22 23 from mod_pywebsocket import handshake 23 24 from mod_pywebsocket.handshake.hybi import compute_accept 24 25 … … 34 35 msg += '\r\n' 35 36 request.connection.write(msg) 36 raise Exception('abort the connection') # Prevents pywebsocket from sending its own handshake message.37 raise handshake.AbortedByUserException('abort the connection') # Prevents pywebsocket from sending its own handshake message. 37 38 38 39 -
trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-accept-header_wsh.py
r90979 r94057 1 from mod_pywebsocket import handshake 2 3 1 4 def web_socket_do_extra_handshake(request): 2 5 message = 'HTTP/1.1 101 Switching Protocols\r\n' … … 5 8 message += '\r\n' 6 9 request.connection.write(message) 7 raise Exception('Abort the connection') # Prevents pywebsocket from sending its own handshake message.10 raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message. 8 11 9 12 -
trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py
r91052 r94057 1 from mod_pywebsocket import handshake 1 2 from mod_pywebsocket.handshake.hybi import compute_accept 2 3 … … 10 11 request.connection.write(msg) 11 12 print msg 12 raise Exception('Abort the connection') # Prevents pywebsocket from sending its own handshake message.13 raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message. 13 14 14 15 -
trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py
r91052 r94057 1 from mod_pywebsocket import handshake 1 2 from mod_pywebsocket.handshake.hybi import compute_accept 2 3 … … 10 11 request.connection.write(msg) 11 12 print msg 12 raise Exception('Abort the connection') # Prevents pywebsocket from sending its own handshake message.13 raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message. 13 14 14 15 -
trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py
r91052 r94057 1 from mod_pywebsocket import handshake 1 2 from mod_pywebsocket.handshake.hybi import compute_accept 2 3 … … 10 11 request.connection.write(msg) 11 12 print msg 12 raise Exception('Abort the connection') # Prevents pywebsocket from sending its own handshake message.13 raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message. 13 14 14 15 -
trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-wrong-accept-header_wsh.py
r90979 r94057 1 from mod_pywebsocket import handshake 2 3 1 4 def web_socket_do_extra_handshake(request): 2 5 message = 'HTTP/1.1 101 Switching Protocols\r\n' … … 6 9 message += '\r\n' 7 10 request.connection.write(message) 8 raise Exception('Abort the connection') # Prevents pywebsocket from sending its own handshake message.11 raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message. 9 12 10 13 -
trunk/LayoutTests/http/tests/websocket/tests/hybi/long-invalid-header_wsh.py
r90979 r94057 1 from mod_pywebsocket import handshake 2 3 1 4 def web_socket_do_extra_handshake(request): 2 5 msg = "HTTP/1.1 101 WebSocket Protocol Handshake\r\n" … … 4 7 msg += "\r\n" 5 8 request.connection.write(msg) 6 raise Exception("Abort the connection") # Prevents pywebsocket from sending its own handshake message.9 raise handshake.AbortedByUserException("Abort the connection") # Prevents pywebsocket from sending its own handshake message. 7 10 8 11 -
trunk/LayoutTests/http/tests/websocket/tests/hybi/masked-frames_wsh.py
r91243 r94057 1 1 from mod_pywebsocket import common 2 from mod_pywebsocket import handshake 2 3 from mod_pywebsocket import stream 3 4 from mod_pywebsocket import msgutil … … 32 33 request.connection.write(stream.create_close_frame('', mask=True)) 33 34 34 raise Exception('Abort the connection') # Prevents pywebsocket from starting its own closing handshake.35 raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from starting its own closing handshake.
Note:
See TracChangeset
for help on using the changeset viewer.