Chromium Code Reviews| Index: chrome/common/media_router/discovery/media_sink_internal_unittest.h |
| diff --git a/chrome/common/media_router/discovery/media_sink_internal_unittest.h b/chrome/common/media_router/discovery/media_sink_internal_unittest.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ab9c2773ef71a9d07fed23d4669ac4ad446df8fb |
| --- /dev/null |
| +++ b/chrome/common/media_router/discovery/media_sink_internal_unittest.h |
| @@ -0,0 +1,46 @@ |
| +// 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.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_COMMON_MEDIA_ROUTER_DISCOVERY_MEDIA_SINK_INTERNAL_UNITTEST_H_ |
| +#define CHROME_COMMON_MEDIA_ROUTER_DISCOVERY_MEDIA_SINK_INTERNAL_UNITTEST_H_ |
| + |
| +#include "chrome/common/media_router/discovery/media_sink_internal.h" |
| +#include "testing/gtest/include/gtest/gtest.h" |
| + |
| +namespace media_router { |
| + |
| +class MediaSinkInternalTest : public ::testing::Test { |
| + public: |
| + MediaSinkInternalTest(); |
| + ~MediaSinkInternalTest() override; |
| + |
| + static DialSinkExtraData CreateDialSinkExtraData( |
| + const std::string& model_name, |
| + const std::string& ip_address, |
| + const std::string& app_url); |
| + |
| + static CastSinkExtraData CreateCastSinkExtraData( |
| + const std::string& model_name, |
| + const std::string& ip_address, |
| + uint8_t capabilities, |
| + int cast_channel_id); |
| + |
| + DialSinkExtraData CreateDialSinkExtraData(); |
| + CastSinkExtraData CreateCastSinkExtraData(); |
| + |
| + MediaSink media_sink() { return media_sink_; } |
| + |
| + private: |
| + std::string sink_id_ = "sinkId123"; |
| + std::string sink_name_ = "The sink"; |
| + std::string ip_address_ = "192.168.1.2"; |
| + std::string model_name_ = "model name"; |
| + std::string app_url_ = "https://example.com"; |
| + |
| + MediaSink media_sink_; |
| +}; |
| + |
| +} // namespace media_router |
| + |
| +#endif // CHROME_COMMON_MEDIA_ROUTER_DISCOVERY_MEDIA_SINK_INTERNAL_UNITTEST_H_ |