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

Side by Side Diff: chrome/browser/extensions/api/top_sites/top_sites_apitest.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 years, 8 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 (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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/extensions/api/top_sites/top_sites_api.h" 9 #include "chrome/browser/extensions/api/top_sites/top_sites_api.h"
10 #include "chrome/browser/extensions/extension_function_test_utils.h" 10 #include "chrome/browser/extensions/extension_function_test_utils.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 }; 67 };
68 68
69 } // namespace 69 } // namespace
70 70
71 IN_PROC_BROWSER_TEST_F(TopSitesExtensionTest, GetTopSites) { 71 IN_PROC_BROWSER_TEST_F(TopSitesExtensionTest, GetTopSites) {
72 scoped_refptr<TopSitesGetFunction> get_top_sites_function( 72 scoped_refptr<TopSitesGetFunction> get_top_sites_function(
73 new TopSitesGetFunction()); 73 new TopSitesGetFunction());
74 // Without a callback the function will not generate a result. 74 // Without a callback the function will not generate a result.
75 get_top_sites_function->set_has_callback(true); 75 get_top_sites_function->set_has_callback(true);
76 76
77 scoped_ptr<base::Value> result(utils::RunFunctionAndReturnSingleResult( 77 std::unique_ptr<base::Value> result(utils::RunFunctionAndReturnSingleResult(
78 get_top_sites_function.get(), "[]", browser())); 78 get_top_sites_function.get(), "[]", browser()));
79 base::ListValue* list; 79 base::ListValue* list;
80 ASSERT_TRUE(result->GetAsList(&list)); 80 ASSERT_TRUE(result->GetAsList(&list));
81 EXPECT_GE(list->GetSize(), top_sites_prepopulated_pages_size()); 81 EXPECT_GE(list->GetSize(), top_sites_prepopulated_pages_size());
82 } 82 }
83 83
84 } // namespace extensions 84 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698