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 "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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 ChromeRenderViewTest::~ChromeRenderViewTest() { | 51 ChromeRenderViewTest::~ChromeRenderViewTest() { |
52 } | 52 } |
53 | 53 |
54 void ChromeRenderViewTest::SetUp() { | 54 void ChromeRenderViewTest::SetUp() { |
55 chrome_render_thread_ = new ChromeMockRenderThread(); | 55 chrome_render_thread_ = new ChromeMockRenderThread(); |
56 render_thread_.reset(chrome_render_thread_); | 56 render_thread_.reset(chrome_render_thread_); |
57 | 57 |
58 content::SetRendererClientForTesting(&chrome_content_renderer_client_); | 58 content::SetRendererClientForTesting(&chrome_content_renderer_client_); |
59 extension_dispatcher_ = new extensions::Dispatcher(); | 59 extension_dispatcher_ = new extensions::Dispatcher(); |
60 chrome_content_renderer_client_.SetExtensionDispatcher(extension_dispatcher_); | 60 chrome_content_renderer_client_.SetExtensionDispatcher(extension_dispatcher_); |
| 61 #if defined(ENABLE_SPELLCHECK) |
61 chrome_content_renderer_client_.SetSpellcheck(new SpellCheck()); | 62 chrome_content_renderer_client_.SetSpellcheck(new SpellCheck()); |
| 63 #endif |
62 | 64 |
63 content::RenderViewTest::SetUp(); | 65 content::RenderViewTest::SetUp(); |
64 | 66 |
65 // RenderView doesn't expose its PasswordAutofillAgent or AutofillAgent | 67 // RenderView doesn't expose its PasswordAutofillAgent or AutofillAgent |
66 // objects, because it has no need to store them directly (they're stored as | 68 // objects, because it has no need to store them directly (they're stored as |
67 // RenderViewObserver*). So just create another set. | 69 // RenderViewObserver*). So just create another set. |
68 password_autofill_ = new PasswordAutofillAgent(view_); | 70 password_autofill_ = new PasswordAutofillAgent(view_); |
69 autofill_agent_ = new AutofillAgent(view_, password_autofill_); | 71 autofill_agent_ = new AutofillAgent(view_, password_autofill_); |
70 } | 72 } |
71 | 73 |
72 void ChromeRenderViewTest::TearDown() { | 74 void ChromeRenderViewTest::TearDown() { |
73 extension_dispatcher_->OnRenderProcessShutdown(); | 75 extension_dispatcher_->OnRenderProcessShutdown(); |
74 extension_dispatcher_ = NULL; | 76 extension_dispatcher_ = NULL; |
75 | 77 |
76 content::RenderViewTest::TearDown(); | 78 content::RenderViewTest::TearDown(); |
77 } | 79 } |
OLD | NEW |