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

Side by Side Diff: components/omnibox/browser/autocomplete_match_unittest.cc

Issue 1841653003: Drop |languages| from {Format,Elide}Url* and IDNToUnicode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in elide_url.cc Created 4 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
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 "components/omnibox/browser/autocomplete_match.h" 5 #include "components/omnibox/browser/autocomplete_match.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 "https://xn--1lq90ic7f1rc.cn/", true }, 182 "https://xn--1lq90ic7f1rc.cn/", true },
183 }; 183 };
184 184
185 for (size_t i = 0; i < arraysize(cases); ++i) { 185 for (size_t i = 0; i < arraysize(cases); ++i) {
186 SCOPED_TRACE("input=" + base::WideToUTF8(cases[i].input) + 186 SCOPED_TRACE("input=" + base::WideToUTF8(cases[i].input) +
187 " url1=" + cases[i].url1 + " url2=" + cases[i].url2); 187 " url1=" + cases[i].url1 + " url2=" + cases[i].url2);
188 AutocompleteInput input( 188 AutocompleteInput input(
189 base::WideToUTF16(cases[i].input), base::string16::npos, std::string(), 189 base::WideToUTF16(cases[i].input), base::string16::npos, std::string(),
190 GURL(), metrics::OmniboxEventProto::INVALID_SPEC, false, false, true, 190 GURL(), metrics::OmniboxEventProto::INVALID_SPEC, false, false, true,
191 true, false, TestSchemeClassifier()); 191 true, false, TestSchemeClassifier());
192 AutocompleteMatch m1(NULL, 100, false, 192 AutocompleteMatch m1(nullptr, 100, false,
193 AutocompleteMatchType::URL_WHAT_YOU_TYPED); 193 AutocompleteMatchType::URL_WHAT_YOU_TYPED);
194 m1.destination_url = GURL(cases[i].url1); 194 m1.destination_url = GURL(cases[i].url1);
195 m1.ComputeStrippedDestinationURL(input, "zh-CN", NULL); 195 m1.ComputeStrippedDestinationURL(input, nullptr);
196 AutocompleteMatch m2(NULL, 100, false, 196 AutocompleteMatch m2(nullptr, 100, false,
197 AutocompleteMatchType::URL_WHAT_YOU_TYPED); 197 AutocompleteMatchType::URL_WHAT_YOU_TYPED);
198 m2.destination_url = GURL(cases[i].url2); 198 m2.destination_url = GURL(cases[i].url2);
199 m2.ComputeStrippedDestinationURL(input, "zh-CN", NULL); 199 m2.ComputeStrippedDestinationURL(input, nullptr);
200 EXPECT_EQ(cases[i].expected_duplicate, 200 EXPECT_EQ(cases[i].expected_duplicate,
201 AutocompleteMatch::DestinationsEqual(m1, m2)); 201 AutocompleteMatch::DestinationsEqual(m1, m2));
202 } 202 }
203 } 203 }
OLDNEW
« no previous file with comments | « components/omnibox/browser/autocomplete_match.cc ('k') | components/omnibox/browser/autocomplete_result.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698