diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-14 19:42:46 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-14 19:42:46 +0000 |
commit | 721c8232e75b813b3c58fc4a498d7e8889b8a2d6 (patch) | |
tree | d594b010604d47d6dd5dd53d380032b3556a7999 /chrome_frame | |
parent | b7fcc1b91c3a5690720347236d17a7e256e18c26 (diff) | |
download | chromium_src-721c8232e75b813b3c58fc4a498d7e8889b8a2d6.zip chromium_src-721c8232e75b813b3c58fc4a498d7e8889b8a2d6.tar.gz chromium_src-721c8232e75b813b3c58fc4a498d7e8889b8a2d6.tar.bz2 |
Fix chrome frame net tests which started crashing on startup after revision 78037 which
adds a ContentBrowserClient interface which serves as a delegate to the content code.
Fix is to initialize the ContentBrowserClient interface as part of the initial bootstapping
code in the chrome frame net tests suite.
BUG=none
TEST=chrome frame net tests should run to completion.
Review URL: http://codereview.chromium.org/6685060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78073 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/test/net/fake_external_tab.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc index a9c2f83..b1ecb28 100644 --- a/chrome_frame/test/net/fake_external_tab.cc +++ b/chrome_frame/test/net/fake_external_tab.cc @@ -22,12 +22,14 @@ #include "base/threading/platform_thread.h" #include "base/win/scoped_handle.h" #include "chrome/browser/automation/automation_provider_list.h" +#include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/prefs/browser_prefs.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/process_singleton.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/renderer_host/web_cache_manager.h" #include "chrome/common/chrome_constants.h" +#include "chrome/common/chrome_content_client.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths_internal.h" #include "chrome/common/chrome_switches.h" @@ -39,6 +41,7 @@ #include "chrome_frame/utils.h" #include "content/browser/plugin_service.h" #include "content/browser/renderer_host/render_process_host.h" +#include "content/common/content_client.h" #include "content/common/content_paths.h" #include "content/common/notification_service.h" #include "testing/gtest/include/gtest/gtest.h" @@ -502,6 +505,15 @@ int main(int argc, char** argv) { return 0; } + // Initialize the content client which that code uses to talk to Chrome. + chrome::ChromeContentClient chrome_content_client; + content::SetContentClient(&chrome_content_client); + + chrome::ChromeContentBrowserClient content_browser_client; + // Override the default ContentBrowserClient to let Chrome participate in + // content logic. Must be done before any tabs are created. + content::GetContentClient()->set_browser_client(&content_browser_client); + // TODO(tommi): Stuff be broke. Needs a fixin'. // This is awkward: the TestSuite derived CFUrlRequestUnittestRunner contains // the instance of the AtExitManager that RegisterPathProvider() and others |