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

Side by Side Diff: chrome/browser/renderer_host/test/test_render_view_host.h

Issue 6532034: GTTF: Use a fresh TestingBrowserProcess for each test, part #2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_
6 #define CHROME_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "chrome/browser/renderer_host/mock_render_process_host.h" 13 #include "chrome/browser/renderer_host/mock_render_process_host.h"
14 #include "chrome/browser/renderer_host/render_widget_host_view.h" 14 #include "chrome/browser/renderer_host/render_widget_host_view.h"
15 #include "chrome/browser/renderer_host/render_view_host.h" 15 #include "chrome/browser/renderer_host/render_view_host.h"
16 #include "chrome/browser/renderer_host/render_view_host_factory.h" 16 #include "chrome/browser/renderer_host/render_view_host_factory.h"
17 #include "chrome/common/page_transition_types.h" 17 #include "chrome/common/page_transition_types.h"
18 #include "chrome/test/testing_browser_process_test.h"
18 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
19 20
20 namespace gfx { 21 namespace gfx {
21 class Rect; 22 class Rect;
22 } 23 }
23 24
24 class NavigationController; 25 class NavigationController;
25 class SiteInstance; 26 class SiteInstance;
26 class TestingProfile; 27 class TestingProfile;
27 class TestTabContents; 28 class TestTabContents;
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 // Instead, we set it right before we create a new RenderViewHost, which 243 // Instead, we set it right before we create a new RenderViewHost, which
243 // happens before the RenderProcessHost is created. This way, the instance 244 // happens before the RenderProcessHost is created. This way, the instance
244 // has the correct factory and creates our special RenderProcessHosts. 245 // has the correct factory and creates our special RenderProcessHosts.
245 RenderProcessHostFactory* render_process_host_factory_; 246 RenderProcessHostFactory* render_process_host_factory_;
246 247
247 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHostFactory); 248 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHostFactory);
248 }; 249 };
249 250
250 // RenderViewHostTestHarness --------------------------------------------------- 251 // RenderViewHostTestHarness ---------------------------------------------------
251 252
252 class RenderViewHostTestHarness : public testing::Test { 253 class RenderViewHostTestHarness : public TestingBrowserProcessTest {
253 public: 254 public:
254 RenderViewHostTestHarness(); 255 RenderViewHostTestHarness();
255 virtual ~RenderViewHostTestHarness(); 256 virtual ~RenderViewHostTestHarness();
256 257
257 NavigationController& controller(); 258 NavigationController& controller();
258 TestTabContents* contents(); 259 TestTabContents* contents();
259 TestRenderViewHost* rvh(); 260 TestRenderViewHost* rvh();
260 TestRenderViewHost* pending_rvh(); 261 TestRenderViewHost* pending_rvh();
261 TestRenderViewHost* active_rvh(); 262 TestRenderViewHost* active_rvh();
262 TestingProfile* profile(); 263 TestingProfile* profile();
(...skipping 26 matching lines...) Expand all
289 290
290 MockRenderProcessHostFactory rph_factory_; 291 MockRenderProcessHostFactory rph_factory_;
291 TestRenderViewHostFactory rvh_factory_; 292 TestRenderViewHostFactory rvh_factory_;
292 293
293 scoped_ptr<TestTabContents> contents_; 294 scoped_ptr<TestTabContents> contents_;
294 295
295 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); 296 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness);
296 }; 297 };
297 298
298 #endif // CHROME_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ 299 #endif // CHROME_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698