Index: third_party/libaddressinput/chromium/cpp/test/address_ui_test.cc |
diff --git a/third_party/libaddressinput/chromium/cpp/test/address_ui_test.cc b/third_party/libaddressinput/chromium/cpp/test/address_ui_test.cc |
index 8eb41309392e68da8d36f6e45a40514ea93a74b8..5239501dd0aa358abb67e9cd57b91fd3de0c6899 100644 |
--- a/third_party/libaddressinput/chromium/cpp/test/address_ui_test.cc |
+++ b/third_party/libaddressinput/chromium/cpp/test/address_ui_test.cc |
@@ -16,7 +16,6 @@ |
#include <libaddressinput/address_field.h> |
#include <libaddressinput/address_ui_component.h> |
-#include <libaddressinput/localization.h> |
#include <string> |
#include <vector> |
@@ -30,7 +29,6 @@ using i18n::addressinput::AddressUiComponent; |
using i18n::addressinput::BuildComponents; |
using i18n::addressinput::COUNTRY; |
using i18n::addressinput::GetRegionCodes; |
-using i18n::addressinput::Localization; |
using i18n::addressinput::RECIPIENT; |
// Returns testing::AssertionSuccess if the |components| are valid. Uses |
@@ -52,8 +50,8 @@ testing::AssertionResult ComponentsAreValid( |
<< component_it->field; |
} |
- if (component_it->name.empty()) { |
- return testing::AssertionFailure() << "empty field name for field " |
+ if (component_it->name_id == 0) { |
please use gerrit instead
2014/01/13 18:50:13
Use INVALID_MESSAGE_ID instead of 0. It's defined
Evan Stade
2014/01/13 23:36:07
This is a concrete example of this CL not being re
|
+ return testing::AssertionFailure() << "invalid field name_id for field " |
<< component_it->field; |
} |
} |
@@ -62,10 +60,7 @@ testing::AssertionResult ComponentsAreValid( |
} |
// Tests for address UI functions. |
-class AddressUiTest : public testing::TestWithParam<std::string> { |
- protected: |
- Localization localization_; |
-}; |
+class AddressUiTest : public testing::TestWithParam<std::string> {}; |
// Verifies that a region code consists of two characters, for example "TW". |
TEST_P(AddressUiTest, RegionCodeHasTwoCharacters) { |
@@ -75,7 +70,7 @@ TEST_P(AddressUiTest, RegionCodeHasTwoCharacters) { |
// Verifies that BuildComponents() returns valid UI components for a region |
// code. |
TEST_P(AddressUiTest, ComponentsAreValid) { |
- EXPECT_TRUE(ComponentsAreValid(BuildComponents(GetParam(), localization_))); |
+ EXPECT_TRUE(ComponentsAreValid(BuildComponents(GetParam()))); |
} |
// Test all regions codes. |
@@ -86,7 +81,7 @@ INSTANTIATE_TEST_CASE_P( |
// Verifies that BuildComponents() returns an empty vector for an invalid region |
// code. |
TEST_F(AddressUiTest, InvalidRegionCodeReturnsEmptyVector) { |
- EXPECT_TRUE(BuildComponents("INVALID-REGION-CODE", localization_).empty()); |
+ EXPECT_TRUE(BuildComponents("INVALID-REGION-CODE").empty()); |
} |
} // namespace |