OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
imcheng
2017/04/25 01:40:13
Can this be inlined in the .cc?
zhaobin
2017/04/26 18:50:05
Seperate it so other tests can use CreateDialSinkE
imcheng
2017/04/26 22:52:16
It sounds like those functions belong in a test_ut
zhaobin
2017/04/27 01:41:20
Done.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_COMMON_MEDIA_ROUTER_DISCOVERY_MEDIA_SINK_INTERNAL_UNITTEST_H_ | |
6 #define CHROME_COMMON_MEDIA_ROUTER_DISCOVERY_MEDIA_SINK_INTERNAL_UNITTEST_H_ | |
7 | |
8 #include "chrome/common/media_router/discovery/media_sink_internal.h" | |
9 #include "testing/gtest/include/gtest/gtest.h" | |
10 | |
11 namespace media_router { | |
12 | |
13 class MediaSinkInternalTest : public ::testing::Test { | |
14 public: | |
15 MediaSinkInternalTest(); | |
16 ~MediaSinkInternalTest() override; | |
17 | |
18 static DialSinkExtraData CreateDialSinkExtraData( | |
19 const std::string& model_name, | |
20 const std::string& ip_address, | |
21 const std::string& app_url); | |
22 | |
23 static CastSinkExtraData CreateCastSinkExtraData( | |
24 const std::string& model_name, | |
25 const std::string& ip_address, | |
26 uint8_t capabilities, | |
27 int cast_channel_id); | |
28 | |
29 DialSinkExtraData CreateDialSinkExtraData(); | |
30 CastSinkExtraData CreateCastSinkExtraData(); | |
31 | |
32 MediaSink media_sink() { return media_sink_; } | |
33 | |
34 private: | |
35 std::string sink_id_ = "sinkId123"; | |
36 std::string sink_name_ = "The sink"; | |
37 std::string ip_address_ = "192.168.1.2"; | |
38 std::string model_name_ = "model name"; | |
39 std::string app_url_ = "https://example.com"; | |
40 | |
41 MediaSink media_sink_; | |
42 }; | |
43 | |
44 } // namespace media_router | |
45 | |
46 #endif // CHROME_COMMON_MEDIA_ROUTER_DISCOVERY_MEDIA_SINK_INTERNAL_UNITTEST_H_ | |
OLD | NEW |