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

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

Issue 10479023: Simplify how Content*Client interfaces are created. Instead of depending on the embedder to know wh… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: remove unused function declaration Created 8 years, 6 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 | Annotate | Revision Log
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 "chrome/browser/extensions/extension_function_dispatcher.h" 7 #include "chrome/browser/extensions/extension_function_dispatcher.h"
8 #include "chrome/common/extensions/extension.h" 8 #include "chrome/common/extensions/extension.h"
9 #include "chrome/common/print_messages.h" 9 #include "chrome/common/print_messages.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 using autofill::AutofillAgent; 44 using autofill::AutofillAgent;
45 using autofill::PasswordAutofillManager; 45 using autofill::PasswordAutofillManager;
46 46
47 ChromeRenderViewTest::ChromeRenderViewTest() : extension_dispatcher_(NULL) { 47 ChromeRenderViewTest::ChromeRenderViewTest() : extension_dispatcher_(NULL) {
48 } 48 }
49 49
50 ChromeRenderViewTest::~ChromeRenderViewTest() { 50 ChromeRenderViewTest::~ChromeRenderViewTest() {
51 } 51 }
52 52
53 void ChromeRenderViewTest::SetUp() { 53 void ChromeRenderViewTest::SetUp() {
54 content::GetContentClient()->set_renderer(&chrome_content_renderer_client_); 54 content::GetContentClient()->set_renderer_for_testing(
55 &chrome_content_renderer_client_);
55 extension_dispatcher_ = new ExtensionDispatcher(); 56 extension_dispatcher_ = new ExtensionDispatcher();
56 chrome_content_renderer_client_.SetExtensionDispatcher(extension_dispatcher_); 57 chrome_content_renderer_client_.SetExtensionDispatcher(extension_dispatcher_);
57 58
58 chrome_render_thread_ = new ChromeMockRenderThread(); 59 chrome_render_thread_ = new ChromeMockRenderThread();
59 render_thread_.reset(chrome_render_thread_); 60 render_thread_.reset(chrome_render_thread_);
60 content::RenderViewTest::SetUp(); 61 content::RenderViewTest::SetUp();
61 62
62 // RenderView doesn't expose it's PasswordAutofillManager or 63 // RenderView doesn't expose it's PasswordAutofillManager or
63 // AutofillAgent objects, because it has no need to store them directly 64 // AutofillAgent objects, because it has no need to store them directly
64 // (they're stored as RenderViewObserver*). So just create another set. 65 // (they're stored as RenderViewObserver*). So just create another set.
65 password_autofill_ = new PasswordAutofillManager(view_); 66 password_autofill_ = new PasswordAutofillManager(view_);
66 autofill_agent_ = new AutofillAgent(view_, password_autofill_); 67 autofill_agent_ = new AutofillAgent(view_, password_autofill_);
67 } 68 }
68 69
69 void ChromeRenderViewTest::TearDown() { 70 void ChromeRenderViewTest::TearDown() {
70 content::RenderViewTest::TearDown(); 71 content::RenderViewTest::TearDown();
71 72
72 extension_dispatcher_->OnRenderProcessShutdown(); 73 extension_dispatcher_->OnRenderProcessShutdown();
73 extension_dispatcher_ = NULL; 74 extension_dispatcher_ = NULL;
74 } 75 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698