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

Side by Side Diff: extensions/browser/api/cast_channel/cast_channel_enum_util_unittest.cc

Issue 2942743002: [cast_channel] Clean up CastSocketImpl ctor parameters (Closed)
Patch Set: fix compile error Created 3 years, 6 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
« no previous file with comments | « extensions/browser/api/cast_channel/cast_channel_enum_util.cc ('k') | 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 "extensions/browser/api/cast_channel/cast_channel_enum_util.h" 5 #include "extensions/browser/api/cast_channel/cast_channel_enum_util.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace extensions { 9 namespace extensions {
10 namespace api { 10 namespace api {
(...skipping 29 matching lines...) Expand all
40 EXPECT_EQ(CHANNEL_ERROR_INVALID_CHANNEL_ID, 40 EXPECT_EQ(CHANNEL_ERROR_INVALID_CHANNEL_ID,
41 ToChannelError(::cast_channel::ChannelError::INVALID_CHANNEL_ID)); 41 ToChannelError(::cast_channel::ChannelError::INVALID_CHANNEL_ID));
42 EXPECT_EQ(CHANNEL_ERROR_CONNECT_TIMEOUT, 42 EXPECT_EQ(CHANNEL_ERROR_CONNECT_TIMEOUT,
43 ToChannelError(::cast_channel::ChannelError::CONNECT_TIMEOUT)); 43 ToChannelError(::cast_channel::ChannelError::CONNECT_TIMEOUT));
44 EXPECT_EQ(CHANNEL_ERROR_PING_TIMEOUT, 44 EXPECT_EQ(CHANNEL_ERROR_PING_TIMEOUT,
45 ToChannelError(::cast_channel::ChannelError::PING_TIMEOUT)); 45 ToChannelError(::cast_channel::ChannelError::PING_TIMEOUT));
46 EXPECT_EQ(CHANNEL_ERROR_UNKNOWN, 46 EXPECT_EQ(CHANNEL_ERROR_UNKNOWN,
47 ToChannelError(::cast_channel::ChannelError::UNKNOWN)); 47 ToChannelError(::cast_channel::ChannelError::UNKNOWN));
48 } 48 }
49 49
50 TEST(CastChannelEnumUtilTest, TestToChannelAuthType) {
51 EXPECT_EQ(CHANNEL_AUTH_TYPE_NONE,
52 ToChannelAuthType(::cast_channel::ChannelAuthType::NONE));
53 EXPECT_EQ(CHANNEL_AUTH_TYPE_SSL_VERIFIED,
54 ToChannelAuthType(::cast_channel::ChannelAuthType::SSL_VERIFIED));
55 }
56
57 TEST(CastChannelEnumUtilTest, TestToChannelAuthTypeInternal) {
58 EXPECT_EQ(::cast_channel::ChannelAuthType::NONE,
59 ToChannelAuthTypeInternal(CHANNEL_AUTH_TYPE_NONE));
60 EXPECT_EQ(::cast_channel::ChannelAuthType::SSL_VERIFIED,
61 ToChannelAuthTypeInternal(CHANNEL_AUTH_TYPE_SSL_VERIFIED));
62 }
63
64 } // namespace 50 } // namespace
65 } // namespace cast_channel 51 } // namespace cast_channel
66 } // namespace api 52 } // namespace api
67 } // namespace extensions 53 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/cast_channel/cast_channel_enum_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698