Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Side by Side Diff: Source/modules/websockets/NewWebSocketChannelImplTest.cpp

Issue 412173002: Oilpan: fix reported unit test leaks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/dom/DocumentTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/dom/DocumentTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698