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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #include <gmock/gmock.h> | 26 #include <gmock/gmock.h> |
27 #include <gtest/gtest.h> | 27 #include <gtest/gtest.h> |
28 | 28 |
29 using testing::_; | 29 using testing::_; |
30 using testing::InSequence; | 30 using testing::InSequence; |
31 using testing::PrintToString; | 31 using testing::PrintToString; |
32 using testing::AnyNumber; | 32 using testing::AnyNumber; |
33 | 33 |
34 | 34 |
35 namespace WebCore { | 35 namespace blink { |
36 | 36 |
37 namespace { | 37 namespace { |
38 | 38 |
39 typedef testing::StrictMock< testing::MockFunction<void(int)> > Checkpoint; | 39 typedef testing::StrictMock< testing::MockFunction<void(int)> > Checkpoint; |
40 | 40 |
41 class MockWebSocketChannelClient : public RefCountedWillBeRefCountedGarbageColle
cted<MockWebSocketChannelClient>, public WebSocketChannelClient { | 41 class MockWebSocketChannelClient : public RefCountedWillBeRefCountedGarbageColle
cted<MockWebSocketChannelClient>, public WebSocketChannelClient { |
42 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MockWebSocketChannelClient); | 42 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MockWebSocketChannelClient); |
43 public: | 43 public: |
44 static PassRefPtrWillBeRawPtr<MockWebSocketChannelClient> create() | 44 static PassRefPtrWillBeRawPtr<MockWebSocketChannelClient> create() |
45 { | 45 { |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 | 734 |
735 EXPECT_CALL(*channelClient(), didReceiveMessageError()); | 735 EXPECT_CALL(*channelClient(), didReceiveMessageError()); |
736 EXPECT_CALL(*channelClient(), didClose(WebSocketChannelClient::ClosingHa
ndshakeIncomplete, WebSocketChannel::CloseEventCodeAbnormalClosure, String())); | 736 EXPECT_CALL(*channelClient(), didClose(WebSocketChannelClient::ClosingHa
ndshakeIncomplete, WebSocketChannel::CloseEventCodeAbnormalClosure, String())); |
737 } | 737 } |
738 | 738 |
739 channel()->fail("fail message from WebSocket", ErrorMessageLevel, "sourceURL
", 1234); | 739 channel()->fail("fail message from WebSocket", ErrorMessageLevel, "sourceURL
", 1234); |
740 } | 740 } |
741 | 741 |
742 } // namespace | 742 } // namespace |
743 | 743 |
744 } // namespace WebCore | 744 } // namespace blink |
OLD | NEW |