From 1f0e5d5a2ef3d120823596c811f1bf1bffccf556 Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Tue, 15 Mar 2011 23:57:23 +0000 Subject: Rearrange the bootstrapping code in chrome frame net tests to ensure that it works correctly in debug builds without firing any DCHECKs. Registered the proxy dictionary pref which tripped up a recent change to add a system level URLRequestContext. BUG=none TEST=chrome frame net tests should run in debug builds without firing DCHECKs Review URL: http://codereview.chromium.org/6697029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78306 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome_frame/test/net/fake_external_tab.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc index 24caed7..b418bb0 100644 --- a/chrome_frame/test/net/fake_external_tab.cc +++ b/chrome_frame/test/net/fake_external_tab.cc @@ -25,6 +25,7 @@ #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/prefs/proxy_config_dictionary.h" #include "chrome/browser/process_singleton.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/renderer_host/web_cache_manager.h" @@ -214,11 +215,7 @@ void FakeExternalTab::Initialize() { browser_process_.reset(new BrowserProcessImpl(*cmd)); // BrowserProcessImpl's constructor should set g_browser_process. DCHECK(g_browser_process); - // Set the app locale and create the child threads. g_browser_process->SetApplicationLocale("en-US"); - g_browser_process->db_thread(); - g_browser_process->file_thread(); - g_browser_process->io_thread(); RenderProcessHost::set_run_renderer_in_process(true); @@ -234,14 +231,16 @@ void FakeExternalTab::Initialize() { PrefService* prefs = profile->GetPrefs(); DCHECK(prefs != NULL); WebCacheManager::RegisterPrefs(prefs); - // Override some settings to avoid hitting some preferences that have not // been registered. prefs->SetBoolean(prefs::kPasswordManagerEnabled, false); prefs->SetBoolean(prefs::kAlternateErrorPagesEnabled, false); prefs->SetBoolean(prefs::kSafeBrowsingEnabled, false); - - profile->InitExtensions(); + prefs->Set(prefs::kProxy, *ProxyConfigDictionary::CreateDirect()); + // Create the child threads. + g_browser_process->db_thread(); + g_browser_process->file_thread(); + g_browser_process->io_thread(); } void FakeExternalTab::Shutdown() { -- cgit v1.1