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

Side by Side Diff: content/public/test/test_renderer_host.cc

Issue 119753007: Add GrabWindowSnapshotAsync tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, compiling Created 6 years, 11 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 "content/public/test/test_renderer_host.h" 5 #include "content/public/test/test_renderer_host.h"
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "content/browser/frame_host/navigation_entry_impl.h" 8 #include "content/browser/frame_host/navigation_entry_impl.h"
9 #include "content/browser/renderer_host/render_view_host_factory.h" 9 #include "content/browser/renderer_host/render_view_host_factory.h"
10 #include "content/browser/renderer_host/render_widget_host_impl.h" 10 #include "content/browser/renderer_host/render_widget_host_impl.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 void RenderViewHostTestHarness::SetUp() { 161 void RenderViewHostTestHarness::SetUp() {
162 thread_bundle_.reset(new TestBrowserThreadBundle(thread_bundle_options_)); 162 thread_bundle_.reset(new TestBrowserThreadBundle(thread_bundle_options_));
163 163
164 #if defined(OS_WIN) 164 #if defined(OS_WIN)
165 ole_initializer_.reset(new ui::ScopedOleInitializer()); 165 ole_initializer_.reset(new ui::ScopedOleInitializer());
166 #endif 166 #endif
167 #if defined(USE_AURA) 167 #if defined(USE_AURA)
168 aura_test_helper_.reset( 168 aura_test_helper_.reset(
169 new aura::test::AuraTestHelper(base::MessageLoopForUI::current())); 169 new aura::test::AuraTestHelper(base::MessageLoopForUI::current()));
170 aura_test_helper_->SetUp(); 170 bool allow_test_contexts = true;
171 aura_test_helper_->SetUp(allow_test_contexts);
171 #endif 172 #endif
172 173
173 DCHECK(!browser_context_); 174 DCHECK(!browser_context_);
174 browser_context_.reset(CreateBrowserContext()); 175 browser_context_.reset(CreateBrowserContext());
175 176
176 SetContents(CreateTestWebContents()); 177 SetContents(CreateTestWebContents());
177 } 178 }
178 179
179 void RenderViewHostTestHarness::TearDown() { 180 void RenderViewHostTestHarness::TearDown() {
180 SetContents(NULL); 181 SetContents(NULL);
(...skipping 25 matching lines...) Expand all
206 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() { 207 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() {
207 return new TestBrowserContext(); 208 return new TestBrowserContext();
208 } 209 }
209 210
210 void RenderViewHostTestHarness::SetRenderProcessHostFactory( 211 void RenderViewHostTestHarness::SetRenderProcessHostFactory(
211 RenderProcessHostFactory* factory) { 212 RenderProcessHostFactory* factory) {
212 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); 213 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory);
213 } 214 }
214 215
215 } // namespace content 216 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura_unittest.cc ('k') | ui/aura/remote_root_window_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698