Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: third_party/libaddressinput/chromium/chrome_rule_test.cc

Issue 237693002: requestAutocomplete should not unlatinize administrative region names. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renames Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | third_party/libaddressinput/chromium/cpp/src/address_validator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "third_party/libaddressinput/chromium/cpp/src/rule.h" 5 #include "third_party/libaddressinput/chromium/cpp/src/rule.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 { L"\u0435\u0436VILLE", L"\u0415\u0416" }, 44 { L"\u0435\u0436VILLE", L"\u0415\u0416" },
45 { L"\u0435\u0436VILL", L"" }, 45 { L"\u0435\u0436VILL", L"" },
46 }; 46 };
47 47
48 const size_t num_cases = sizeof(expectations) / sizeof(expectations[0]); 48 const size_t num_cases = sizeof(expectations) / sizeof(expectations[0]);
49 for (size_t i = 0; i < num_cases; ++i) { 49 for (size_t i = 0; i < num_cases; ++i) {
50 const std::string input(base::WideToUTF8(expectations[i].input)); 50 const std::string input(base::WideToUTF8(expectations[i].input));
51 const std::string expected_output(base::WideToUTF8(expectations[i].output)); 51 const std::string expected_output(base::WideToUTF8(expectations[i].output));
52 std::string output; 52 std::string output;
53 EXPECT_EQ(!expected_output.empty(), 53 EXPECT_EQ(!expected_output.empty(),
54 rule.CanonicalizeSubKey(input, &output)) 54 rule.CanonicalizeSubKey(input, true, &output))
55 << "Failed for input " << input; 55 << "Failed for input " << input;
56 EXPECT_EQ(expected_output, output); 56 EXPECT_EQ(expected_output, output);
57 } 57 }
58 } 58 }
OLDNEW
« no previous file with comments | « no previous file | third_party/libaddressinput/chromium/cpp/src/address_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698