| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "modules/websockets/WebSocketChannel.h" | 6 #include "modules/websockets/WebSocketChannel.h" |
| 7 | 7 |
| 8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "core/fileapi/Blob.h" | 9 #include "core/fileapi/Blob.h" |
| 10 #include "core/frame/ConsoleTypes.h" | 10 #include "core/frame/ConsoleTypes.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 virtual ~MockWebSocketChannelClient() { } | 52 virtual ~MockWebSocketChannelClient() { } |
| 53 | 53 |
| 54 MOCK_METHOD2(didConnect, void(const String&, const String&)); | 54 MOCK_METHOD2(didConnect, void(const String&, const String&)); |
| 55 MOCK_METHOD1(didReceiveTextMessage, void(const String&)); | 55 MOCK_METHOD1(didReceiveTextMessage, void(const String&)); |
| 56 virtual void didReceiveBinaryMessage(PassOwnPtr<Vector<char> > payload) over
ride | 56 virtual void didReceiveBinaryMessage(PassOwnPtr<Vector<char> > payload) over
ride |
| 57 { | 57 { |
| 58 didReceiveBinaryMessageMock(*payload); | 58 didReceiveBinaryMessageMock(*payload); |
| 59 } | 59 } |
| 60 MOCK_METHOD1(didReceiveBinaryMessageMock, void(const Vector<char>&)); | 60 MOCK_METHOD1(didReceiveBinaryMessageMock, void(const Vector<char>&)); |
| 61 MOCK_METHOD0(didError, void()); | 61 MOCK_METHOD0(didError, void()); |
| 62 MOCK_METHOD1(didConsumeBufferedAmount, void(unsigned long)); | 62 MOCK_METHOD1(didConsumeBufferedAmount, void(unsigned)); |
| 63 MOCK_METHOD0(didStartClosingHandshake, void()); | 63 MOCK_METHOD0(didStartClosingHandshake, void()); |
| 64 MOCK_METHOD3(didClose, void(ClosingHandshakeCompletionStatus, unsigned short
, const String&)); | 64 MOCK_METHOD3(didClose, void(ClosingHandshakeCompletionStatus, unsigned short
, const String&)); |
| 65 | 65 |
| 66 virtual void trace(Visitor* visitor) override | 66 virtual void trace(Visitor* visitor) override |
| 67 { | 67 { |
| 68 WebSocketChannelClient::trace(visitor); | 68 WebSocketChannelClient::trace(visitor); |
| 69 } | 69 } |
| 70 | 70 |
| 71 }; | 71 }; |
| 72 | 72 |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 EXPECT_CALL(*channelClient(), didError()); | 731 EXPECT_CALL(*channelClient(), didError()); |
| 732 EXPECT_CALL(*channelClient(), didClose(WebSocketChannelClient::ClosingHa
ndshakeIncomplete, WebSocketChannel::CloseEventCodeAbnormalClosure, String())); | 732 EXPECT_CALL(*channelClient(), didClose(WebSocketChannelClient::ClosingHa
ndshakeIncomplete, WebSocketChannel::CloseEventCodeAbnormalClosure, String())); |
| 733 } | 733 } |
| 734 | 734 |
| 735 channel()->fail("fail message from WebSocket", ErrorMessageLevel, "sourceURL
", 1234); | 735 channel()->fail("fail message from WebSocket", ErrorMessageLevel, "sourceURL
", 1234); |
| 736 } | 736 } |
| 737 | 737 |
| 738 } // namespace | 738 } // namespace |
| 739 | 739 |
| 740 } // namespace blink | 740 } // namespace blink |
| OLD | NEW |