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

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

Issue 410263002: Oilpan: fix WebSockets unit tests after r178758. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 NewWebSocketChannelImplTest() 86 NewWebSocketChannelImplTest()
87 : m_pageHolder(DummyPageHolder::create()) 87 : m_pageHolder(DummyPageHolder::create())
88 , m_channelClient(MockWebSocketChannelClient::create()) 88 , m_channelClient(MockWebSocketChannelClient::create())
89 , m_handle(MockWebSocketHandle::create()) 89 , m_handle(MockWebSocketHandle::create())
90 , m_channel(NewWebSocketChannelImpl::create(&m_pageHolder->document(), m _channelClient.get(), String(), 0, handle())) 90 , m_channel(NewWebSocketChannelImpl::create(&m_pageHolder->document(), m _channelClient.get(), String(), 0, handle()))
91 , m_sumOfConsumedBufferedAmount(0) 91 , m_sumOfConsumedBufferedAmount(0)
92 { 92 {
93 ON_CALL(*channelClient(), didConsumeBufferedAmount(_)).WillByDefault(Inv oke(this, &NewWebSocketChannelImplTest::didConsumeBufferedAmount)); 93 ON_CALL(*channelClient(), didConsumeBufferedAmount(_)).WillByDefault(Inv oke(this, &NewWebSocketChannelImplTest::didConsumeBufferedAmount));
94 } 94 }
95 95
96 ~NewWebSocketChannelImplTest() { } 96 ~NewWebSocketChannelImplTest()
97 {
98 #if ENABLE(OILPAN)
99 channel()->disconnect();
100 #endif
101 }
97 102
98 MockWebSocketChannelClient* channelClient() 103 MockWebSocketChannelClient* channelClient()
99 { 104 {
100 return m_channelClient.get(); 105 return m_channelClient.get();
101 } 106 }
102 107
103 WebSocketChannel* channel() 108 WebSocketChannel* channel()
104 { 109 {
105 return static_cast<WebSocketChannel*>(m_channel.get()); 110 return static_cast<WebSocketChannel*>(m_channel.get());
106 } 111 }
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 EXPECT_CALL(*channelClient(), didReceiveMessageError()); 727 EXPECT_CALL(*channelClient(), didReceiveMessageError());
723 EXPECT_CALL(*channelClient(), didClose(WebSocketChannelClient::ClosingHa ndshakeIncomplete, WebSocketChannel::CloseEventCodeAbnormalClosure, String())); 728 EXPECT_CALL(*channelClient(), didClose(WebSocketChannelClient::ClosingHa ndshakeIncomplete, WebSocketChannel::CloseEventCodeAbnormalClosure, String()));
724 } 729 }
725 730
726 channel()->fail("fail message from WebSocket", ErrorMessageLevel, "sourceURL ", 1234); 731 channel()->fail("fail message from WebSocket", ErrorMessageLevel, "sourceURL ", 1234);
727 } 732 }
728 733
729 } // namespace 734 } // namespace
730 735
731 } // namespace WebCore 736 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698