| 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..9c3e82627462e581da0a6a0fbe5c977854db663d 100644
|
| --- a/third_party/libaddressinput/chromium/cpp/test/address_ui_test.cc
|
| +++ b/third_party/libaddressinput/chromium/cpp/test/address_ui_test.cc
|
| @@ -16,13 +16,14 @@
|
|
|
| #include <libaddressinput/address_field.h>
|
| #include <libaddressinput/address_ui_component.h>
|
| -#include <libaddressinput/localization.h>
|
|
|
| #include <string>
|
| #include <vector>
|
|
|
| #include <gtest/gtest.h>
|
|
|
| +#include "grit.h"
|
| +
|
| namespace {
|
|
|
| using i18n::addressinput::AddressField;
|
| @@ -30,7 +31,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 +52,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 == INVALID_MESSAGE_ID) {
|
| + return testing::AssertionFailure() << "invalid field name_id for field "
|
| << component_it->field;
|
| }
|
| }
|
| @@ -62,10 +62,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 +72,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 +83,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
|
|
|