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
3 // found in the LICENSE file.
5 #include "extensions/browser/api/cast_channel/cast_test_util.h"
9 namespace cast_channel
{
11 const char kTestExtensionId
[] = "ddchlicdkolnonkihahngkmmmjnjlkkf";
13 MockCastTransport::MockCastTransport() {
15 MockCastTransport::~MockCastTransport() {
18 CastTransport::Delegate
* MockCastTransport::current_delegate() const {
20 return delegate_
.get();
23 void MockCastTransport::SetReadDelegate(
24 scoped_ptr
<CastTransport::Delegate
> delegate
) {
25 delegate_
= delegate
.Pass();
28 MockCastTransportDelegate::MockCastTransportDelegate() {
30 MockCastTransportDelegate::~MockCastTransportDelegate() {
33 MockCastSocket::MockCastSocket()
34 : CastSocket(kTestExtensionId
), mock_transport_(new MockCastTransport
) {
36 MockCastSocket::~MockCastSocket() {
39 net::IPEndPoint
CreateIPEndPointForTest() {
40 net::IPAddressNumber number
;
41 number
.push_back(192);
42 number
.push_back(168);
45 return net::IPEndPoint(number
, 8009);
48 } // namespace cast_channel
49 } // namespace core_api
50 } // namespace extensions