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

Side by Side Diff: LayoutTests/http/tests/websocket/close-on-unload_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 unified diff | Download patch
OLDNEW
1 # Copyright 2009, Google Inc. 1 # Copyright 2009, Google Inc.
2 # All rights reserved. 2 # All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 # notify to client that message is received by server. 49 # notify to client that message is received by server.
50 msgutil.send_message(request, message) 50 msgutil.send_message(request, message)
51 msgutil.receive_message(request) # wait, and exception by close. 51 msgutil.receive_message(request) # wait, and exception by close.
52 dataToBroadcast["message"] = message 52 dataToBroadcast["message"] = message
53 dataToBroadcast["closeCode"] = str(request.ws_close_code) 53 dataToBroadcast["closeCode"] = str(request.ws_close_code)
54 finally: 54 finally:
55 # request is closed. notify this dataToBroadcast to other WebSockets. 55 # request is closed. notify this dataToBroadcast to other WebSockets.
56 del connections[request] 56 del connections[request]
57 for ws in connections.keys(): 57 for ws in connections.keys():
58 msgutil.send_message(ws, json.dumps(dataToBroadcast)) 58 msgutil.send_message(ws, json.dumps(dataToBroadcast))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698