summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-05 14:43:01 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-05 14:43:01 +0000
commitc6681f35e68c7689fdfd8794e0b1ec4cb92059e0 (patch)
tree9bc947f0a938e736e3660507ba47e7e6bac97a00 /chrome_frame/test
parentc36a9e1dd2f21fce9ac430bd896b9f76e9a8eb73 (diff)
downloadchromium_src-c6681f35e68c7689fdfd8794e0b1ec4cb92059e0.zip
chromium_src-c6681f35e68c7689fdfd8794e0b1ec4cb92059e0.tar.gz
chromium_src-c6681f35e68c7689fdfd8794e0b1ec4cb92059e0.tar.bz2
Simplify how Content*Client interfaces are created. Instead of depending on the embedder to know when to create and set them and to handle special cases like zygote/single-process, directly ask the embedder to create an instance of a specific type. Also, if the embedder doesn't return an instance create the empty version.
Remove MockContentRendererClient since it existed before ContentRendererClient had an implementation and has no need anymore. Rename MockContentBrowserClient to TestContentBrowserClient to better reflect how it's used. BUG=98716 Review URL: https://chromiumcodereview.appspot.com/10479023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140524 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test')
-rw-r--r--chrome_frame/test/net/fake_external_tab.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc
index d73d03d..203fa1f 100644
--- a/chrome_frame/test/net/fake_external_tab.cc
+++ b/chrome_frame/test/net/fake_external_tab.cc
@@ -147,17 +147,19 @@ class FakeMainDelegate : public content::ContentMainDelegate {
logging_win::InstallTestLogCollector(
testing::UnitTest::GetInstance());
- // Initialize the content client.
content::SetContentClient(&g_chrome_content_client.Get());
-
- // Override the default ContentBrowserClient to let Chrome participate in
- // content logic. We use a subclass of Chrome's implementation,
- // FakeContentBrowserClient, to override CreateBrowserMainParts. Must
- // be done before any tabs are created.
- content::GetContentClient()->set_browser(&g_browser_client.Get());
- content::GetContentClient()->set_renderer(&g_renderer_client.Get());
+ content::GetContentClient()->set_renderer_for_testing(
+ &g_renderer_client.Get());
return false;
}
+
+ // Override the default ContentBrowserClient to let Chrome participate in
+ // content logic. We use a subclass of Chrome's implementation,
+ // FakeContentBrowserClient, to override CreateBrowserMainParts. Must
+ // be done before any tabs are created.
+ virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE {
+ return &g_browser_client.Get();
+ };
};
void FilterDisabledTests() {