| 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 "android_webview/native/address_parser.h" | 5 #include "android_webview/browser/address_parser.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "android_webview/native/address_parser_internal.h" | 11 #include "android_webview/browser/address_parser_internal.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 using namespace android_webview::address_parser; | 17 using namespace android_webview::address_parser; |
| 18 using namespace android_webview::address_parser::internal; | 18 using namespace android_webview::address_parser::internal; |
| 19 | 19 |
| 20 class AddressParserTest : public testing::Test { | 20 class AddressParserTest : public testing::Test { |
| 21 public: | 21 public: |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 EXPECT_FALSE(ContainsAddress("1 This, has, too* many, lines, to, be* valid")); | 603 EXPECT_FALSE(ContainsAddress("1 This, has, too* many, lines, to, be* valid")); |
| 604 EXPECT_FALSE(ContainsAddress( | 604 EXPECT_FALSE(ContainsAddress( |
| 605 "1 Supercalifragilisticexpialidocious is too long, CA 90000")); | 605 "1 Supercalifragilisticexpialidocious is too long, CA 90000")); |
| 606 EXPECT_FALSE(ContainsAddress("")); | 606 EXPECT_FALSE(ContainsAddress("")); |
| 607 } | 607 } |
| 608 | 608 |
| 609 TEST_F(AddressParserTest, FullAddressWithoutZipCode) { | 609 TEST_F(AddressParserTest, FullAddressWithoutZipCode) { |
| 610 EXPECT_TRUE(IsAddress("1600 Amphitheatre Parkway Mountain View, CA")); | 610 EXPECT_TRUE(IsAddress("1600 Amphitheatre Parkway Mountain View, CA")); |
| 611 EXPECT_TRUE(IsAddress("201 S. Division St. Suite 500 Ann Arbor, MI")); | 611 EXPECT_TRUE(IsAddress("201 S. Division St. Suite 500 Ann Arbor, MI")); |
| 612 } | 612 } |
| OLD | NEW |