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

Side by Side Diff: chrome/browser/ui/webui/settings/settings_manage_profile_handler_unittest.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ui/webui/settings/settings_manage_profile_handler.h" 5 #include "chrome/browser/ui/webui/settings/settings_manage_profile_handler.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/common/pref_names.h" 8 #include "chrome/common/pref_names.h"
9 #include "chrome/test/base/testing_browser_process.h" 9 #include "chrome/test/base/testing_browser_process.h"
10 #include "chrome/test/base/testing_profile_manager.h" 10 #include "chrome/test/base/testing_profile_manager.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 content::TestWebUI* web_ui() { return &web_ui_; } 58 content::TestWebUI* web_ui() { return &web_ui_; }
59 Profile* profile() const { return profile_; } 59 Profile* profile() const { return profile_; }
60 TestManageProfileHandler* handler() const { return handler_.get(); } 60 TestManageProfileHandler* handler() const { return handler_.get(); }
61 61
62 private: 62 private:
63 content::TestBrowserThreadBundle thread_bundle_; 63 content::TestBrowserThreadBundle thread_bundle_;
64 TestingProfileManager profile_manager_; 64 TestingProfileManager profile_manager_;
65 content::TestWebUI web_ui_; 65 content::TestWebUI web_ui_;
66 66
67 Profile* profile_; 67 Profile* profile_;
68 scoped_ptr<TestManageProfileHandler> handler_; 68 std::unique_ptr<TestManageProfileHandler> handler_;
69 }; 69 };
70 70
71 TEST_F(ManageProfileHandlerTest, HandleSetProfileIconAndName) { 71 TEST_F(ManageProfileHandlerTest, HandleSetProfileIconAndName) {
72 base::ListValue list_args; 72 base::ListValue list_args;
73 list_args.Append( 73 list_args.Append(
74 new base::StringValue("chrome://theme/IDR_PROFILE_AVATAR_15")); 74 new base::StringValue("chrome://theme/IDR_PROFILE_AVATAR_15"));
75 list_args.Append(new base::StringValue("New Profile Name")); 75 list_args.Append(new base::StringValue("New Profile Name"));
76 handler()->HandleSetProfileIconAndName(&list_args); 76 handler()->HandleSetProfileIconAndName(&list_args);
77 77
78 PrefService* pref_service = profile()->GetPrefs(); 78 PrefService* pref_service = profile()->GetPrefs();
(...skipping 30 matching lines...) Expand all
109 EXPECT_EQ("cr.webUIListenerCallback", data.function_name()); 109 EXPECT_EQ("cr.webUIListenerCallback", data.function_name());
110 110
111 std::string event_id; 111 std::string event_id;
112 ASSERT_TRUE(data.arg1()->GetAsString(&event_id)); 112 ASSERT_TRUE(data.arg1()->GetAsString(&event_id));
113 EXPECT_EQ("available-icons-changed", event_id); 113 EXPECT_EQ("available-icons-changed", event_id);
114 114
115 VerifyIconList(data.arg2()); 115 VerifyIconList(data.arg2());
116 } 116 }
117 117
118 } // namespace settings 118 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698