summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/render_process_host.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-21 23:50:15 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-21 23:50:15 +0000
commita6df511aec98ab84faaa1b238335a4640bba940f (patch)
treec842583482ced9a424443695d121798a3468df0e /chrome/browser/renderer_host/render_process_host.h
parent9257d0132435d1248ca586e878ee67b1b8dcdb56 (diff)
downloadchromium_src-a6df511aec98ab84faaa1b238335a4640bba940f.zip
chromium_src-a6df511aec98ab84faaa1b238335a4640bba940f.tar.gz
chromium_src-a6df511aec98ab84faaa1b238335a4640bba940f.tar.bz2
Factor out the test web contents from the WebContents unit test so that it can
be used by other tests. Properly hook up the MockRenderProcessHost so it gets created when initialized by SiteInstances through a factory object. Fix other bugs with the test harness I found when I switched all the WebContents test over to using it. Review URL: http://codereview.chromium.org/18432 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8416 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_process_host.h')
-rw-r--r--chrome/browser/renderer_host/render_process_host.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/render_process_host.h b/chrome/browser/renderer_host/render_process_host.h
index 46e1353..acb7a83 100644
--- a/chrome/browser/renderer_host/render_process_host.h
+++ b/chrome/browser/renderer_host/render_process_host.h
@@ -200,4 +200,13 @@ class RenderProcessHost : public IPC::Channel::Sender,
DISALLOW_COPY_AND_ASSIGN(RenderProcessHost);
};
+// Factory object for RenderProcessHosts. Using this factory allows tests to
+// swap out a different one to use a TestRenderProcessHost.
+class RenderProcessHostFactory {
+ public:
+ virtual ~RenderProcessHostFactory() {}
+ virtual RenderProcessHost* CreateRenderProcessHost(
+ Profile* profile) const = 0;
+};
+
#endif // CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_