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

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

Issue 707173004: Refactor Autofill for out of process iframes (OOPIF). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mem leak Created 6 years 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/renderer/chrome_content_renderer_client.cc ('k') | components/autofill.gypi » ('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 "chrome/browser/chrome_content_browser_client.h" 8 #include "chrome/browser/chrome_content_browser_client.h"
9 #include "chrome/common/chrome_content_client.h" 9 #include "chrome/common/chrome_content_client.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 void ChromeRenderViewTest::SetUp() { 58 void ChromeRenderViewTest::SetUp() {
59 ChromeUnitTestSuite::InitializeProviders(); 59 ChromeUnitTestSuite::InitializeProviders();
60 ChromeUnitTestSuite::InitializeResourceBundle(); 60 ChromeUnitTestSuite::InitializeResourceBundle();
61 61
62 chrome_render_thread_ = new ChromeMockRenderThread(); 62 chrome_render_thread_ = new ChromeMockRenderThread();
63 render_thread_.reset(chrome_render_thread_); 63 render_thread_.reset(chrome_render_thread_);
64 64
65 content::RenderViewTest::SetUp(); 65 content::RenderViewTest::SetUp();
66 66
67 // RenderView doesn't expose its Agent objects, because it has no need to 67 // RenderFrame doesn't expose its Agent objects, because it has no need to
68 // store them directly (they're stored as RenderViewObserver*). So just 68 // store them directly (they're stored as RenderFrameObserver*). So just
69 // create another set. 69 // create another set.
70 password_autofill_agent_ = new autofill::TestPasswordAutofillAgent(view_); 70 password_autofill_agent_ =
71 password_generation_ = new autofill::TestPasswordGenerationAgent(view_); 71 new autofill::TestPasswordAutofillAgent(view_->GetMainRenderFrame());
72 password_generation_ =
73 new autofill::TestPasswordGenerationAgent(view_->GetMainRenderFrame());
72 autofill_agent_ = 74 autofill_agent_ =
73 new AutofillAgent(view_, password_autofill_agent_, password_generation_); 75 new AutofillAgent(view_->GetMainRenderFrame(), password_autofill_agent_,
76 password_generation_);
74 } 77 }
75 78
76 void ChromeRenderViewTest::TearDown() { 79 void ChromeRenderViewTest::TearDown() {
77 #if defined(ENABLE_EXTENSIONS) 80 #if defined(ENABLE_EXTENSIONS)
78 ChromeContentRendererClient* client = 81 ChromeContentRendererClient* client =
79 static_cast<ChromeContentRendererClient*>(content_renderer_client_.get()); 82 static_cast<ChromeContentRendererClient*>(content_renderer_client_.get());
80 client->GetExtensionDispatcherForTest()->OnRenderProcessShutdown(); 83 client->GetExtensionDispatcherForTest()->OnRenderProcessShutdown();
81 #endif 84 #endif
82 85
83 #if defined(LEAK_SANITIZER) 86 #if defined(LEAK_SANITIZER)
(...skipping 20 matching lines...) Expand all
104 extension_dispatcher_delegate_.reset( 107 extension_dispatcher_delegate_.reset(
105 new ChromeExtensionsDispatcherDelegate()); 108 new ChromeExtensionsDispatcherDelegate());
106 client->SetExtensionDispatcherForTest( 109 client->SetExtensionDispatcherForTest(
107 new extensions::Dispatcher(extension_dispatcher_delegate_.get())); 110 new extensions::Dispatcher(extension_dispatcher_delegate_.get()));
108 #endif 111 #endif
109 #if defined(ENABLE_SPELLCHECK) 112 #if defined(ENABLE_SPELLCHECK)
110 client->SetSpellcheck(new SpellCheck()); 113 client->SetSpellcheck(new SpellCheck());
111 #endif 114 #endif
112 return client; 115 return client;
113 } 116 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | components/autofill.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698