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

Side by Side Diff: chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc

Issue 501263002: Remove implicit conversions from scoped_refptr to T* in chrome/browser/extensions/api/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just in case Created 6 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 private: 157 private:
158 DISALLOW_COPY_AND_ASSIGN(PreferencesPrivateApiTest); 158 DISALLOW_COPY_AND_ASSIGN(PreferencesPrivateApiTest);
159 }; 159 };
160 160
161 void 161 void
162 PreferencesPrivateApiTest::TestGetSyncCategoriesWithoutPassphraseFunction() { 162 PreferencesPrivateApiTest::TestGetSyncCategoriesWithoutPassphraseFunction() {
163 scoped_refptr<PreferencesPrivateGetSyncCategoriesWithoutPassphraseFunction> 163 scoped_refptr<PreferencesPrivateGetSyncCategoriesWithoutPassphraseFunction>
164 function( 164 function(
165 new PreferencesPrivateGetSyncCategoriesWithoutPassphraseFunction); 165 new PreferencesPrivateGetSyncCategoriesWithoutPassphraseFunction);
166 ASSERT_TRUE(extension_function_test_utils::RunFunction( 166 ASSERT_TRUE(extension_function_test_utils::RunFunction(
167 function, 167 function.get(), "[]", browser_, extension_function_test_utils::NONE));
168 "[]",
169 browser_,
170 extension_function_test_utils::NONE));
171 EXPECT_FALSE(service_->initialized_state_violation()); 168 EXPECT_FALSE(service_->initialized_state_violation());
172 169
173 const base::ListValue* result = function->GetResultList(); 170 const base::ListValue* result = function->GetResultList();
174 EXPECT_EQ(1u, result->GetSize()); 171 EXPECT_EQ(1u, result->GetSize());
175 172
176 const base::ListValue* categories = NULL; 173 const base::ListValue* categories = NULL;
177 ASSERT_TRUE(result->GetList(0, &categories)); 174 ASSERT_TRUE(result->GetList(0, &categories));
178 EXPECT_NE(categories->end(), 175 EXPECT_NE(categories->end(),
179 categories->Find(base::StringValue(bookmarks::kBookmarksFileName))); 176 categories->Find(base::StringValue(bookmarks::kBookmarksFileName)));
180 EXPECT_NE(categories->end(), 177 EXPECT_NE(categories->end(),
(...skipping 13 matching lines...) Expand all
194 191
195 // Verifies that we wait for the sync service to be ready before checking 192 // Verifies that we wait for the sync service to be ready before checking
196 // encryption status. 193 // encryption status.
197 IN_PROC_BROWSER_TEST_F(PreferencesPrivateApiTest, 194 IN_PROC_BROWSER_TEST_F(PreferencesPrivateApiTest,
198 GetSyncCategoriesWithoutPassphraseAsynchronous) { 195 GetSyncCategoriesWithoutPassphraseAsynchronous) {
199 service_->set_sync_initialized(false); 196 service_->set_sync_initialized(false);
200 TestGetSyncCategoriesWithoutPassphraseFunction(); 197 TestGetSyncCategoriesWithoutPassphraseFunction();
201 } 198 }
202 199
203 } // namespace 200 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698