Lines Matching refs:WebSocketEvent
20 struct WebSocketEvent { struct
25 WebSocketEvent(EventType type, net::WebSocket* websocket, in WebSocketEvent() argument
51 void SetOnOpen(Callback1<WebSocketEvent*>::Type* callback) { in SetOnOpen() argument
54 void SetOnMessage(Callback1<WebSocketEvent*>::Type* callback) { in SetOnMessage()
57 void SetOnClose(Callback1<WebSocketEvent*>::Type* callback) { in SetOnClose()
63 WebSocketEvent(WebSocketEvent::EVENT_OPEN, socket, in OnOpen()
71 WebSocketEvent(WebSocketEvent::EVENT_MESSAGE, socket, msg, false)); in OnMessage()
77 WebSocketEvent(WebSocketEvent::EVENT_ERROR, socket, in OnError()
84 WebSocketEvent(WebSocketEvent::EVENT_CLOSE, socket, in OnClose()
92 void DoClose(WebSocketEvent* event) { in DoClose()
96 const std::vector<WebSocketEvent>& GetSeenEvents() const { in GetSeenEvents()
101 std::vector<WebSocketEvent> events_;
102 Callback1<WebSocketEvent*>::Type* onopen_;
103 Callback1<WebSocketEvent*>::Type* onmessage_;
104 Callback1<WebSocketEvent*>::Type* onerror_;
105 Callback1<WebSocketEvent*>::Type* onclose_;
195 const std::vector<WebSocketEvent>& events = delegate->GetSeenEvents(); in TEST_F()
198 EXPECT_EQ(WebSocketEvent::EVENT_OPEN, events[0].event_type); in TEST_F()
199 EXPECT_EQ(WebSocketEvent::EVENT_CLOSE, events[1].event_type); in TEST_F()
258 const std::vector<WebSocketEvent>& events = delegate->GetSeenEvents(); in TEST_F()
261 EXPECT_EQ(WebSocketEvent::EVENT_OPEN, events[0].event_type); in TEST_F()
262 EXPECT_EQ(WebSocketEvent::EVENT_MESSAGE, events[1].event_type); in TEST_F()
264 EXPECT_EQ(WebSocketEvent::EVENT_CLOSE, events[2].event_type); in TEST_F()
297 const std::vector<WebSocketEvent>& events = delegate->GetSeenEvents(); in TEST_F()
300 EXPECT_EQ(WebSocketEvent::EVENT_ERROR, events[0].event_type); in TEST_F()
331 const std::vector<WebSocketEvent>& events = delegate->GetSeenEvents(); in TEST_F()
344 const std::vector<WebSocketEvent>& events = delegate->GetSeenEvents(); in TEST_F()
347 EXPECT_EQ(WebSocketEvent::EVENT_MESSAGE, events[0].event_type); in TEST_F()