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 "chrome/browser/autocomplete/bookmark_provider.h" | 5 #include "chrome/browser/autocomplete/bookmark_provider.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // For testing strange spacing in bookmark titles. | 63 // For testing strange spacing in bookmark titles. |
64 { " hello1 hello2 ", "http://whatever.com/" }, | 64 { " hello1 hello2 ", "http://whatever.com/" }, |
65 { "", "http://emptytitle.com/" }, | 65 { "", "http://emptytitle.com/" }, |
66 }; | 66 }; |
67 | 67 |
68 class BookmarkProviderTest : public testing::Test { | 68 class BookmarkProviderTest : public testing::Test { |
69 public: | 69 public: |
70 BookmarkProviderTest(); | 70 BookmarkProviderTest(); |
71 | 71 |
72 protected: | 72 protected: |
73 virtual void SetUp() OVERRIDE; | 73 virtual void SetUp() override; |
74 | 74 |
75 bookmarks::TestBookmarkClient client_; | 75 bookmarks::TestBookmarkClient client_; |
76 scoped_ptr<TestingProfile> profile_; | 76 scoped_ptr<TestingProfile> profile_; |
77 scoped_ptr<BookmarkModel> model_; | 77 scoped_ptr<BookmarkModel> model_; |
78 scoped_refptr<BookmarkProvider> provider_; | 78 scoped_refptr<BookmarkProvider> provider_; |
79 | 79 |
80 private: | 80 private: |
81 DISALLOW_COPY_AND_ASSIGN(BookmarkProviderTest); | 81 DISALLOW_COPY_AND_ASSIGN(BookmarkProviderTest); |
82 }; | 82 }; |
83 | 83 |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 ASSERT_EQ(2U, chunks.size()) << description; | 465 ASSERT_EQ(2U, chunks.size()) << description; |
466 size_t offset; | 466 size_t offset; |
467 EXPECT_TRUE(base::StringToSizeT(chunks[0], &offset)) << description; | 467 EXPECT_TRUE(base::StringToSizeT(chunks[0], &offset)) << description; |
468 EXPECT_EQ(offset, match.contents_class[i].offset) << description; | 468 EXPECT_EQ(offset, match.contents_class[i].offset) << description; |
469 int style; | 469 int style; |
470 EXPECT_TRUE(base::StringToInt(chunks[1], &style)) << description; | 470 EXPECT_TRUE(base::StringToInt(chunks[1], &style)) << description; |
471 EXPECT_EQ(style, match.contents_class[i].style) << description; | 471 EXPECT_EQ(style, match.contents_class[i].style) << description; |
472 } | 472 } |
473 } | 473 } |
474 } | 474 } |
OLD | NEW |