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

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

Issue 1181113005: Componentize HistoryURLProvider/ScoredHistoryMatch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prepare_history_url_provider_for_c14n
Patch Set: Rebase Created 5 years, 6 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/scored_history_match.cc ('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 "chrome/browser/autocomplete/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"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 467 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/scored_history_match.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698