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

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

Issue 2738003002: Add title to current page in zero suggest. (Closed)
Patch Set: Add flag to show title for current URL suggestion. Created 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/history_quick_provider.h" 5 #include "components/omnibox/browser/history_quick_provider.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <random> 8 #include <random>
9 #include <string> 9 #include <string>
10 10
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 for (const auto& measurement : measurements) 154 for (const auto& measurement : measurements)
155 durations += std::to_string(measurement.InMillisecondsRoundedUp()) + ','; 155 durations += std::to_string(measurement.InMillisecondsRoundedUp()) + ',';
156 156
157 perf_test::PrintResultList(test_info->test_case_name(), test_info->name(), 157 perf_test::PrintResultList(test_info->test_case_name(), test_info->name(),
158 trace_name, durations, "ms", true); 158 trace_name, durations, "ms", true);
159 } 159 }
160 160
161 base::TimeDelta HQPPerfTestOnePopularURL::RunTest(const base::string16& text) { 161 base::TimeDelta HQPPerfTestOnePopularURL::RunTest(const base::string16& text) {
162 base::RunLoop().RunUntilIdle(); 162 base::RunLoop().RunUntilIdle();
163 AutocompleteInput input(text, base::string16::npos, std::string(), GURL(), 163 AutocompleteInput input(text, base::string16::npos, std::string(), GURL(),
164 base::string16(),
164 metrics::OmniboxEventProto::INVALID_SPEC, false, 165 metrics::OmniboxEventProto::INVALID_SPEC, false,
165 false, true, true, false, TestSchemeClassifier()); 166 false, true, true, false, TestSchemeClassifier());
166 167
167 if (base::ThreadTicks::IsSupported()) { 168 if (base::ThreadTicks::IsSupported()) {
168 base::ThreadTicks start = base::ThreadTicks::Now(); 169 base::ThreadTicks start = base::ThreadTicks::Now();
169 provider_->Start(input, false); 170 provider_->Start(input, false);
170 return base::ThreadTicks::Now() - start; 171 return base::ThreadTicks::Now() - start;
171 } 172 }
172 173
173 base::Time start = base::Time::Now(); 174 base::Time start = base::Time::Now();
(...skipping 30 matching lines...) Expand all
204 RunAllTests(prefixes.begin(), prefixes.end()); 205 RunAllTests(prefixes.begin(), prefixes.end());
205 } 206 }
206 207
207 TEST_F(HQPPerfTestOnePopularURL, Backspacing) { 208 TEST_F(HQPPerfTestOnePopularURL, Backspacing) {
208 std::string test_url = GeneratePopularURLRow().url().spec(); 209 std::string test_url = GeneratePopularURLRow().url().spec();
209 StringPieces prefixes = AllPrefixes(test_url); 210 StringPieces prefixes = AllPrefixes(test_url);
210 RunAllTests(prefixes.rbegin(), prefixes.rend()); 211 RunAllTests(prefixes.rbegin(), prefixes.rend());
211 } 212 }
212 213
213 } // namespace history 214 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698