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

Side by Side Diff: chrome/test/base/chrome_render_view_test.cc

Issue 2341693002: Re-write many calls to WrapUnique() with MakeUnique() (Closed)
Patch Set: Change std::string() back to "" to fix compile Created 4 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
« no previous file with comments | « chrome/service/service_process_prefs.cc ('k') | chrome/test/base/test_browser_window.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/test/base/chrome_render_view_test.h" 5 #include "chrome/test/base/chrome_render_view_test.h"
6 6
7 #include "base/debug/leak_annotations.h" 7 #include "base/debug/leak_annotations.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 void ChromeRenderViewTest::RegisterMainFrameRemoteInterfaces() {} 161 void ChromeRenderViewTest::RegisterMainFrameRemoteInterfaces() {}
162 162
163 void ChromeRenderViewTest::InitChromeContentRendererClient( 163 void ChromeRenderViewTest::InitChromeContentRendererClient(
164 ChromeContentRendererClient* client) { 164 ChromeContentRendererClient* client) {
165 #if defined(ENABLE_EXTENSIONS) 165 #if defined(ENABLE_EXTENSIONS)
166 extension_dispatcher_delegate_.reset( 166 extension_dispatcher_delegate_.reset(
167 new ChromeExtensionsDispatcherDelegate()); 167 new ChromeExtensionsDispatcherDelegate());
168 ChromeExtensionsRendererClient* ext_client = 168 ChromeExtensionsRendererClient* ext_client =
169 ChromeExtensionsRendererClient::GetInstance(); 169 ChromeExtensionsRendererClient::GetInstance();
170 ext_client->SetExtensionDispatcherForTest(base::WrapUnique( 170 ext_client->SetExtensionDispatcherForTest(
171 new extensions::Dispatcher(extension_dispatcher_delegate_.get()))); 171 base::MakeUnique<extensions::Dispatcher>(
172 extension_dispatcher_delegate_.get()));
172 #endif 173 #endif
173 #if defined(ENABLE_SPELLCHECK) 174 #if defined(ENABLE_SPELLCHECK)
174 client->SetSpellcheck(new SpellCheck()); 175 client->SetSpellcheck(new SpellCheck());
175 #endif 176 #endif
176 } 177 }
177 178
178 void ChromeRenderViewTest::EnableUserGestureSimulationForAutofill() { 179 void ChromeRenderViewTest::EnableUserGestureSimulationForAutofill() {
179 EXPECT_CALL(*(static_cast<MockAutofillAgent*>(autofill_agent_)), 180 EXPECT_CALL(*(static_cast<MockAutofillAgent*>(autofill_agent_)),
180 IsUserGesture()).WillRepeatedly(Return(true)); 181 IsUserGesture()).WillRepeatedly(Return(true));
181 } 182 }
182 183
183 void ChromeRenderViewTest::DisableUserGestureSimulationForAutofill() { 184 void ChromeRenderViewTest::DisableUserGestureSimulationForAutofill() {
184 EXPECT_CALL(*(static_cast<MockAutofillAgent*>(autofill_agent_)), 185 EXPECT_CALL(*(static_cast<MockAutofillAgent*>(autofill_agent_)),
185 IsUserGesture()).WillRepeatedly(Return(false)); 186 IsUserGesture()).WillRepeatedly(Return(false));
186 } 187 }
187 188
188 void ChromeRenderViewTest::WaitForAutofillDidAssociateFormControl() { 189 void ChromeRenderViewTest::WaitForAutofillDidAssociateFormControl() {
189 static_cast<MockAutofillAgent*>(autofill_agent_) 190 static_cast<MockAutofillAgent*>(autofill_agent_)
190 ->WaitForAutofillDidAssociateFormControl(); 191 ->WaitForAutofillDidAssociateFormControl();
191 } 192 }
OLDNEW
« no previous file with comments | « chrome/service/service_process_prefs.cc ('k') | chrome/test/base/test_browser_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698