| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |