| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 , m_channel(NewWebSocketChannelImpl::create(&m_pageHolder->document(), m
_channelClient.get(), String(), 0, handle())) | 95 , m_channel(NewWebSocketChannelImpl::create(&m_pageHolder->document(), m
_channelClient.get(), String(), 0, handle())) |
| 96 , m_sumOfConsumedBufferedAmount(0) | 96 , m_sumOfConsumedBufferedAmount(0) |
| 97 { | 97 { |
| 98 ON_CALL(*channelClient(), didConsumeBufferedAmount(_)).WillByDefault(Inv
oke(this, &NewWebSocketChannelImplTest::didConsumeBufferedAmount)); | 98 ON_CALL(*channelClient(), didConsumeBufferedAmount(_)).WillByDefault(Inv
oke(this, &NewWebSocketChannelImplTest::didConsumeBufferedAmount)); |
| 99 } | 99 } |
| 100 | 100 |
| 101 ~NewWebSocketChannelImplTest() | 101 ~NewWebSocketChannelImplTest() |
| 102 { | 102 { |
| 103 #if ENABLE(OILPAN) | 103 #if ENABLE(OILPAN) |
| 104 channel()->disconnect(); | 104 channel()->disconnect(); |
| 105 m_channelClient.clear(); |
| 106 m_channel.clear(); |
| 107 Heap::collectAllGarbage(); |
| 105 #endif | 108 #endif |
| 106 } | 109 } |
| 107 | 110 |
| 108 MockWebSocketChannelClient* channelClient() | 111 MockWebSocketChannelClient* channelClient() |
| 109 { | 112 { |
| 110 return m_channelClient.get(); | 113 return m_channelClient.get(); |
| 111 } | 114 } |
| 112 | 115 |
| 113 WebSocketChannel* channel() | 116 WebSocketChannel* channel() |
| 114 { | 117 { |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 EXPECT_CALL(*channelClient(), didReceiveMessageError()); | 735 EXPECT_CALL(*channelClient(), didReceiveMessageError()); |
| 733 EXPECT_CALL(*channelClient(), didClose(WebSocketChannelClient::ClosingHa
ndshakeIncomplete, WebSocketChannel::CloseEventCodeAbnormalClosure, String())); | 736 EXPECT_CALL(*channelClient(), didClose(WebSocketChannelClient::ClosingHa
ndshakeIncomplete, WebSocketChannel::CloseEventCodeAbnormalClosure, String())); |
| 734 } | 737 } |
| 735 | 738 |
| 736 channel()->fail("fail message from WebSocket", ErrorMessageLevel, "sourceURL
", 1234); | 739 channel()->fail("fail message from WebSocket", ErrorMessageLevel, "sourceURL
", 1234); |
| 737 } | 740 } |
| 738 | 741 |
| 739 } // namespace | 742 } // namespace |
| 740 | 743 |
| 741 } // namespace WebCore | 744 } // namespace WebCore |
| OLD | NEW |