| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |