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/fileapi/Blob.h" | 8 #include "core/fileapi/Blob.h" |
9 #include "core/frame/ConsoleTypes.h" | 9 #include "core/frame/ConsoleTypes.h" |
10 #include "core/testing/DummyPageHolder.h" | 10 #include "core/testing/DummyPageHolder.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 MOCK_METHOD1(didReceiveMessage, void(const String&)); | 54 MOCK_METHOD1(didReceiveMessage, void(const String&)); |
55 virtual void didReceiveBinaryData(PassOwnPtr<Vector<char> > binaryData) OVER
RIDE | 55 virtual void didReceiveBinaryData(PassOwnPtr<Vector<char> > binaryData) OVER
RIDE |
56 { | 56 { |
57 didReceiveBinaryDataMock(*binaryData); | 57 didReceiveBinaryDataMock(*binaryData); |
58 } | 58 } |
59 MOCK_METHOD1(didReceiveBinaryDataMock, void(const Vector<char>&)); | 59 MOCK_METHOD1(didReceiveBinaryDataMock, void(const Vector<char>&)); |
60 MOCK_METHOD0(didReceiveMessageError, void()); | 60 MOCK_METHOD0(didReceiveMessageError, void()); |
61 MOCK_METHOD1(didConsumeBufferedAmount, void(unsigned long)); | 61 MOCK_METHOD1(didConsumeBufferedAmount, void(unsigned long)); |
62 MOCK_METHOD0(didStartClosingHandshake, void()); | 62 MOCK_METHOD0(didStartClosingHandshake, void()); |
63 MOCK_METHOD3(didClose, void(ClosingHandshakeCompletionStatus, unsigned short
, const String&)); | 63 MOCK_METHOD3(didClose, void(ClosingHandshakeCompletionStatus, unsigned short
, const String&)); |
64 MOCK_METHOD1(trace, void(Visitor*)); | 64 |
| 65 virtual void trace(Visitor* visitor) OVERRIDE |
| 66 { |
| 67 WebSocketChannelClient::trace(visitor); |
| 68 } |
| 69 |
65 }; | 70 }; |
66 | 71 |
67 class MockWebSocketHandle : public blink::WebSocketHandle { | 72 class MockWebSocketHandle : public blink::WebSocketHandle { |
68 public: | 73 public: |
69 static MockWebSocketHandle* create() | 74 static MockWebSocketHandle* create() |
70 { | 75 { |
71 return new testing::StrictMock<MockWebSocketHandle>(); | 76 return new testing::StrictMock<MockWebSocketHandle>(); |
72 } | 77 } |
73 | 78 |
74 MockWebSocketHandle() { } | 79 MockWebSocketHandle() { } |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 EXPECT_CALL(*channelClient(), didReceiveMessageError()); | 732 EXPECT_CALL(*channelClient(), didReceiveMessageError()); |
728 EXPECT_CALL(*channelClient(), didClose(WebSocketChannelClient::ClosingHa
ndshakeIncomplete, WebSocketChannel::CloseEventCodeAbnormalClosure, String())); | 733 EXPECT_CALL(*channelClient(), didClose(WebSocketChannelClient::ClosingHa
ndshakeIncomplete, WebSocketChannel::CloseEventCodeAbnormalClosure, String())); |
729 } | 734 } |
730 | 735 |
731 channel()->fail("fail message from WebSocket", ErrorMessageLevel, "sourceURL
", 1234); | 736 channel()->fail("fail message from WebSocket", ErrorMessageLevel, "sourceURL
", 1234); |
732 } | 737 } |
733 | 738 |
734 } // namespace | 739 } // namespace |
735 | 740 |
736 } // namespace WebCore | 741 } // namespace WebCore |
OLD | NEW |