Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Keep this file in sync with the .proto files in this directory. | 5 // Keep this file in sync with the .proto files in this directory. |
| 6 | 6 |
| 7 #include "sync/protocol/proto_enum_conversions.h" | 7 #include "sync/protocol/proto_enum_conversions.h" |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 sync_pb::TabNavigation::PageTransitionQualifier_MAX); | 51 sync_pb::TabNavigation::PageTransitionQualifier_MAX); |
| 52 } | 52 } |
| 53 | 53 |
| 54 TEST_F(ProtoEnumConversionsTest, GetUpdatesSourceString) { | 54 TEST_F(ProtoEnumConversionsTest, GetUpdatesSourceString) { |
| 55 TestEnumStringFunction( | 55 TestEnumStringFunction( |
| 56 GetUpdatesSourceString, | 56 GetUpdatesSourceString, |
| 57 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource_MIN, | 57 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource_MIN, |
| 58 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource_MAX); | 58 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource_MAX); |
| 59 } | 59 } |
| 60 | 60 |
| 61 TEST_F(ProtoEnumConversionsTest, GetResponseTypeString) { | |
| 62 TestEnumStringFunction( | |
| 63 GetResponseTypeString, | |
| 64 sync_pb::CommitResponse::ResponseType_MIN, | |
| 65 sync_pb::CommitResponse::ResponseType_MAX); | |
| 66 } | |
| 67 | |
| 68 TEST_F(ProtoEnumConversionsTest, GetErrorTypeString) { | |
| 69 TestEnumStringFunction( | |
| 70 GetErrorTypeString, | |
| 71 sync_pb::SyncEnums::ErrorType_MIN, | |
| 72 sync_pb::SyncEnums::MIGRATION_DONE); | |
| 73 | |
| 74 // ErrorType enum is sequential only upto MIGRATION_DONE. | |
|
akalin
2012/03/17 01:55:05
upto -> up to
Although for consistency it would b
lipalani1
2012/03/19 19:24:37
Done.
| |
| 75 TestEnumStringFunction( | |
| 76 GetErrorTypeString, | |
| 77 sync_pb::SyncEnums::UNKNOWN, | |
| 78 sync_pb::SyncEnums::UNKNOWN); | |
|
akalin
2012/03/17 01:55:05
replace the last UNKNOWN with ErrorType_MAX
lipalani1
2012/03/19 19:24:37
Done.
| |
| 79 | |
| 80 } | |
| 81 | |
| 82 TEST_F(ProtoEnumConversionsTest, GetActionString) { | |
| 83 TestEnumStringFunction( | |
| 84 GetActionString, | |
| 85 sync_pb::ClientToServerResponse::Error::Action_MIN, | |
| 86 sync_pb::ClientToServerResponse::Error::Action_MAX); | |
| 87 } | |
| 88 | |
| 61 } // namespace | 89 } // namespace |
| 62 } // namespace browser_sync | 90 } // namespace browser_sync |
| OLD | NEW |