blob: eb5908b0266a2a5bc4cc513e2afed1befcb68001 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "extensions/browser/api/cast_channel/cast_test_util.h"
#include <utility>
namespace extensions {
namespace api {
namespace cast_channel {
const char kTestExtensionId[] = "ddchlicdkolnonkihahngkmmmjnjlkkf";
MockCastTransport::MockCastTransport() {
}
MockCastTransport::~MockCastTransport() {
}
CastTransport::Delegate* MockCastTransport::current_delegate() const {
CHECK(delegate_);
return delegate_.get();
}
void MockCastTransport::SetReadDelegate(
scoped_ptr<CastTransport::Delegate> delegate) {
delegate_ = std::move(delegate);
}
MockCastTransportDelegate::MockCastTransportDelegate() {
}
MockCastTransportDelegate::~MockCastTransportDelegate() {
}
MockCastSocket::MockCastSocket()
: CastSocket(kTestExtensionId), mock_transport_(new MockCastTransport) {
}
MockCastSocket::~MockCastSocket() {
}
net::IPEndPoint CreateIPEndPointForTest() {
net::IPAddressNumber number;
number.push_back(192);
number.push_back(168);
number.push_back(1);
number.push_back(1);
return net::IPEndPoint(number, 8009);
}
} // namespace cast_channel
} // namespace api
} // namespace extensions
|