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

Side by Side Diff: components/omnibox/scored_history_match_unittest.cc

Issue 1219653002: Componentize ScoredHistoryMatch unittest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@componentize_autocomplete_controller
Patch Set: Created 5 years, 5 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
« no previous file with comments | « components/omnibox/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "components/omnibox/scored_history_match.h" 5 #include "components/omnibox/scored_history_match.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 483
484 EXPECT_TRUE( 484 EXPECT_TRUE(
485 ScoredHistoryMatch::GetHQPBucketsFromString(buckets_str, &hqp_buckets)); 485 ScoredHistoryMatch::GetHQPBucketsFromString(buckets_str, &hqp_buckets));
486 EXPECT_THAT(hqp_buckets, ElementsAre(Pair(0.0, 400), Pair(1.5, 600), 486 EXPECT_THAT(hqp_buckets, ElementsAre(Pair(0.0, 400), Pair(1.5, 600),
487 Pair(12.0, 1300), Pair(20.0, 1399))); 487 Pair(12.0, 1300), Pair(20.0, 1399)));
488 // invalid string. 488 // invalid string.
489 buckets_str = "0.0,400,1.5,600"; 489 buckets_str = "0.0,400,1.5,600";
490 EXPECT_FALSE( 490 EXPECT_FALSE(
491 ScoredHistoryMatch::GetHQPBucketsFromString(buckets_str, &hqp_buckets)); 491 ScoredHistoryMatch::GetHQPBucketsFromString(buckets_str, &hqp_buckets));
492 } 492 }
OLDNEW
« no previous file with comments | « components/omnibox/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698