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

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

Issue 7831075: Delegating the "are images allowed" decision to renderer. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Test build fixes. Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 ChromeRenderViewTest::ChromeRenderViewTest() : extension_dispatcher_(NULL) { 50 ChromeRenderViewTest::ChromeRenderViewTest() : extension_dispatcher_(NULL) {
51 } 51 }
52 52
53 ChromeRenderViewTest::~ChromeRenderViewTest() { 53 ChromeRenderViewTest::~ChromeRenderViewTest() {
54 } 54 }
55 55
56 void ChromeRenderViewTest::SetUp() { 56 void ChromeRenderViewTest::SetUp() {
57 content::GetContentClient()->set_renderer(&chrome_content_renderer_client_); 57 content::GetContentClient()->set_renderer(&chrome_content_renderer_client_);
58 extension_dispatcher_ = new ExtensionDispatcher(); 58 extension_dispatcher_ = new ExtensionDispatcher();
59 chrome_content_renderer_client_.SetExtensionDispatcher(extension_dispatcher_); 59 chrome_content_renderer_client_.SetExtensionDispatcher(extension_dispatcher_);
60 chrome_content_renderer_client_.SetImageSettingRules(&image_setting_rules_);
60 61
61 chrome_render_thread_ = new ChromeMockRenderThread(); 62 chrome_render_thread_ = new ChromeMockRenderThread();
62 render_thread_.reset(chrome_render_thread_); 63 render_thread_.reset(chrome_render_thread_);
63 content::RenderViewTest::SetUp(); 64 content::RenderViewTest::SetUp();
64 65
65 WebScriptController::registerExtension(new ChromeV8Extension( 66 WebScriptController::registerExtension(new ChromeV8Extension(
66 "extensions/json_schema.js", IDR_JSON_SCHEMA_JS, NULL)); 67 "extensions/json_schema.js", IDR_JSON_SCHEMA_JS, NULL));
67 WebScriptController::registerExtension(EventBindings::Get( 68 WebScriptController::registerExtension(EventBindings::Get(
68 extension_dispatcher_)); 69 extension_dispatcher_));
69 WebScriptController::registerExtension(RendererExtensionBindings::Get( 70 WebScriptController::registerExtension(RendererExtensionBindings::Get(
(...skipping 11 matching lines...) Expand all
81 } 82 }
82 83
83 void ChromeRenderViewTest::TearDown() { 84 void ChromeRenderViewTest::TearDown() {
84 content::RenderViewTest::TearDown(); 85 content::RenderViewTest::TearDown();
85 86
86 render_thread_->SendCloseMessage(); 87 render_thread_->SendCloseMessage();
87 88
88 extension_dispatcher_->OnRenderProcessShutdown(); 89 extension_dispatcher_->OnRenderProcessShutdown();
89 extension_dispatcher_ = NULL; 90 extension_dispatcher_ = NULL;
90 } 91 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698