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 #include "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "base/string_util.h" | 6 #include "base/string_util.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "content/common/android/address_parser.h" | 8 #include "content/common/android/address_parser.h" |
9 #include "content/common/android/address_parser_internal.h" | 9 #include "content/common/android/address_parser_internal.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 using namespace content::address_parser; | 12 using namespace content::address_parser; |
13 using namespace content::address_parser::internal; | 13 using namespace content::address_parser::internal; |
14 | 14 |
15 class AddressParserTest : public testing::Test { | 15 class AddressParserTest : public testing::Test { |
16 public: | 16 public: |
17 AddressParserTest() {} | 17 AddressParserTest() {} |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 EXPECT_TRUE(IsAddress("79th Street 1st Floor New York City, NY 10024-5192")); | 585 EXPECT_TRUE(IsAddress("79th Street 1st Floor New York City, NY 10024-5192")); |
586 | 586 |
587 EXPECT_FALSE(ContainsAddress("123 Fake Street, Springfield, Springfield")); | 587 EXPECT_FALSE(ContainsAddress("123 Fake Street, Springfield, Springfield")); |
588 EXPECT_FALSE(ContainsAddress("999 Street Avenue, City, ZZ 98765")); | 588 EXPECT_FALSE(ContainsAddress("999 Street Avenue, City, ZZ 98765")); |
589 EXPECT_FALSE(ContainsAddress("76 Here be dragons, CA 94043")); | 589 EXPECT_FALSE(ContainsAddress("76 Here be dragons, CA 94043")); |
590 EXPECT_FALSE(ContainsAddress("1 This, has, too* many, lines, to, be* valid")); | 590 EXPECT_FALSE(ContainsAddress("1 This, has, too* many, lines, to, be* valid")); |
591 EXPECT_FALSE(ContainsAddress( | 591 EXPECT_FALSE(ContainsAddress( |
592 "1 Supercalifragilisticexpialidocious is too long, CA 90000")); | 592 "1 Supercalifragilisticexpialidocious is too long, CA 90000")); |
593 EXPECT_FALSE(ContainsAddress("")); | 593 EXPECT_FALSE(ContainsAddress("")); |
594 } | 594 } |
OLD | NEW |