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

Side by Side Diff: chrome/browser/autocomplete/bookmark_provider_unittest.cc

Issue 16295003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/autocomplete/search_provider_unittest.cc » ('j') | 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/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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 scoped_refptr<BookmarkProvider> provider_; 67 scoped_refptr<BookmarkProvider> provider_;
68 68
69 private: 69 private:
70 DISALLOW_COPY_AND_ASSIGN(BookmarkProviderTest); 70 DISALLOW_COPY_AND_ASSIGN(BookmarkProviderTest);
71 }; 71 };
72 72
73 void BookmarkProviderTest::SetUp() { 73 void BookmarkProviderTest::SetUp() {
74 profile_.reset(new TestingProfile()); 74 profile_.reset(new TestingProfile());
75 DCHECK(profile_.get()); 75 DCHECK(profile_.get());
76 provider_ = new BookmarkProvider(this, profile_.get()); 76 provider_ = new BookmarkProvider(this, profile_.get());
77 DCHECK(provider_); 77 DCHECK(provider_.get());
78 provider_->set_bookmark_model_for_testing(model_.get()); 78 provider_->set_bookmark_model_for_testing(model_.get());
79 79
80 const BookmarkNode* other_node = model_->other_node(); 80 const BookmarkNode* other_node = model_->other_node();
81 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(bookmark_provider_test_data); ++i) { 81 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(bookmark_provider_test_data); ++i) {
82 const BookmarksTestInfo& cur(bookmark_provider_test_data[i]); 82 const BookmarksTestInfo& cur(bookmark_provider_test_data[i]);
83 const GURL url(cur.url); 83 const GURL url(cur.url);
84 model_->AddURL(other_node, other_node->child_count(), 84 model_->AddURL(other_node, other_node->child_count(),
85 ASCIIToUTF16(cur.title), url); 85 ASCIIToUTF16(cur.title), url);
86 } 86 }
87 } 87 }
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 << query_data[i].matches[j] << "' for query: '" 332 << query_data[i].matches[j] << "' for query: '"
333 << query_data[i].query << "'."; 333 << query_data[i].query << "'.";
334 if (j >= matches.size()) 334 if (j >= matches.size())
335 continue; 335 continue;
336 EXPECT_EQ(query_data[i].matches[j], UTF16ToUTF8(matches[j].description)) 336 EXPECT_EQ(query_data[i].matches[j], UTF16ToUTF8(matches[j].description))
337 << " Mismatch at [" << base::IntToString(j) << "] for query '" 337 << " Mismatch at [" << base::IntToString(j) << "] for query '"
338 << query_data[i].query << "'."; 338 << query_data[i].query << "'.";
339 } 339 }
340 } 340 }
341 } 341 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/search_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698