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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "base/string16.h" | 7 #include "base/string16.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/api/bookmarks/bookmark_service.h" | 9 #include "chrome/browser/api/bookmarks/bookmark_service.h" |
10 #include "chrome/browser/history/scored_history_match.h" | 10 #include "chrome/browser/history/scored_history_match.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 EXPECT_FALSE(scored_c.match_in_scheme); | 269 EXPECT_FALSE(scored_c.match_in_scheme); |
270 } | 270 } |
271 } | 271 } |
272 | 272 |
273 class BookmarkServiceMock : public BookmarkService { | 273 class BookmarkServiceMock : public BookmarkService { |
274 public: | 274 public: |
275 explicit BookmarkServiceMock(const GURL& url); | 275 explicit BookmarkServiceMock(const GURL& url); |
276 virtual ~BookmarkServiceMock() {} | 276 virtual ~BookmarkServiceMock() {} |
277 | 277 |
278 // Returns true if the given |url| is the same as |url_|. | 278 // Returns true if the given |url| is the same as |url_|. |
279 bool IsBookmarked(const GURL& url) OVERRIDE; | 279 virtual bool IsBookmarked(const GURL& url) OVERRIDE; |
280 | 280 |
281 // Required but unused. | 281 // Required but unused. |
282 virtual void GetBookmarks(std::vector<URLAndTitle>* bookmarks) OVERRIDE {} | 282 virtual void GetBookmarks(std::vector<URLAndTitle>* bookmarks) OVERRIDE {} |
283 virtual void BlockTillLoaded() OVERRIDE {} | 283 virtual void BlockTillLoaded() OVERRIDE {} |
284 | 284 |
285 private: | 285 private: |
286 const GURL url_; | 286 const GURL url_; |
287 | 287 |
288 DISALLOW_COPY_AND_ASSIGN(BookmarkServiceMock); | 288 DISALLOW_COPY_AND_ASSIGN(BookmarkServiceMock); |
289 }; | 289 }; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 // possibly mid-word matches in the ?arg section of the URL and | 403 // possibly mid-word matches in the ?arg section of the URL and |
404 // mid-word title matches--I can imagine scoring those pretty | 404 // mid-word title matches--I can imagine scoring those pretty |
405 // harshly as well). | 405 // harshly as well). |
406 EXPECT_GT(path_mid_word_score, protocol_score); | 406 EXPECT_GT(path_mid_word_score, protocol_score); |
407 EXPECT_GT(path_mid_word_score, protocol_mid_word_score); | 407 EXPECT_GT(path_mid_word_score, protocol_mid_word_score); |
408 EXPECT_GT(path_mid_word_score, tld_score); | 408 EXPECT_GT(path_mid_word_score, tld_score); |
409 EXPECT_GT(path_mid_word_score, tld_mid_word_score); | 409 EXPECT_GT(path_mid_word_score, tld_mid_word_score); |
410 } | 410 } |
411 | 411 |
412 } // namespace history | 412 } // namespace history |
OLD | NEW |