Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: LayoutTests/http/tests/websocket/tests/hybi/invalid-encode-length_wsh.py

Issue 101143002: Remove hybi sub directory for WebSocket layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/websocket/tests/hybi/invalid-encode-length_wsh.py
diff --git a/LayoutTests/http/tests/websocket/tests/hybi/invalid-encode-length_wsh.py b/LayoutTests/http/tests/websocket/tests/hybi/invalid-encode-length_wsh.py
deleted file mode 100644
index 92bdea4298a0e3f71cd4ea291bfe17bcfbd4f1b2..0000000000000000000000000000000000000000
--- a/LayoutTests/http/tests/websocket/tests/hybi/invalid-encode-length_wsh.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import re
-import struct
-from mod_pywebsocket import common
-
-
-def web_socket_do_extra_handshake(request):
- pass
-
-
-def web_socket_transfer_data(request):
- match = re.search(r'\?case=(\d+_\d+)$', request.ws_resource)
- if match is None:
- msgutil.send_message(request, 'FAIL: Query value is incorrect or missing')
- return
-
- payload_length, extended_length = (match.group(1)).split('_', 1)
- payload_length = int(payload_length)
- extended_length = int(extended_length)
-
- # pywebsocket refuses to create a frame with error encode length.
- # Thus, we need to build a frame manually.
- header = chr(0x80 | common.OPCODE_TEXT) # 0x80 is for "fin" bit.
- header += chr(payload_length) # No Mask and two bytes extended payload length.
- if payload_length == 126:
- header += struct.pack('!H', extended_length)
- elif payload_length == 127:
- header += struct.pack('!Q', extended_length)
- else:
- msgutil.send_message(request, 'FAIL: Query value is incorrect or missing')
- return
- request.connection.write(header)
- request.connection.write('X' * extended_length)

Powered by Google App Engine
This is Rietveld 408576698