summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-02 15:05:47 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-02 15:05:47 +0000
commit7b57f6c31e7f1b645ab9e2fd77608f4e696f7319 (patch)
treed141ddc21faee4c500fbebbab37c9850c4ffed8e /chrome_frame/test
parentc47dd48233da3609f469054b99ca02c6069f5b95 (diff)
downloadchromium_src-7b57f6c31e7f1b645ab9e2fd77608f4e696f7319.zip
chromium_src-7b57f6c31e7f1b645ab9e2fd77608f4e696f7319.tar.gz
chromium_src-7b57f6c31e7f1b645ab9e2fd77608f4e696f7319.tar.bz2
Fixes to get the chrome frame network tests up and running on the chrome frame builder.
Fixes as below:- 1. Instantiate the SystemMonitor object as it is needed to instantiate the profile. 2. Adds the single-process command line to the chrome_frame_net_tests executable to ensure that the webkit thread gets initialized correctly. 3. Register additional prefs in the profile to get around some DCHECKS which fire in debug mode TBR=tommi Review URL: http://codereview.chromium.org/464001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33570 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test')
-rw-r--r--chrome_frame/test/net/fake_external_tab.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc
index af65424..a07aeed 100644
--- a/chrome_frame/test/net/fake_external_tab.cc
+++ b/chrome_frame/test/net/fake_external_tab.cc
@@ -23,6 +23,7 @@
#include "chrome/browser/process_singleton.h"
#include "chrome/browser/profile_manager.h"
#include "chrome/browser/renderer_host/render_process_host.h"
+#include "chrome/browser/renderer_host/web_cache_manager.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_paths_internal.h"
@@ -95,6 +96,7 @@ bool FakeExternalTab::GetProfilePath(FilePath* path) {
void FakeExternalTab::Initialize() {
DCHECK(g_browser_process == NULL);
+ SystemMonitor system_monitor;
// The gears plugin causes the PluginRequestInterceptor to kick in and it
// will cause problems when it tries to intercept URL requests.
@@ -116,7 +118,10 @@ void FakeExternalTab::Initialize() {
ResourceBundle::InitSharedInstance(L"en-US");
- const CommandLine* cmd = CommandLine::ForCurrentProcess();
+ CommandLine* cmd = CommandLine::ForCurrentProcess();
+ cmd->AppendSwitch(switches::kDisableWebResources);
+ cmd->AppendSwitch(switches::kSingleProcess);
+
browser_process_.reset(new BrowserProcessImpl(*cmd));
RenderProcessHost::set_run_renderer_in_process(true);
// BrowserProcessImpl's constructor should set g_browser_process.
@@ -125,11 +130,14 @@ void FakeExternalTab::Initialize() {
Profile* profile = g_browser_process->profile_manager()->
GetDefaultProfile(FilePath(user_data()));
PrefService* prefs = profile->GetPrefs();
+ DCHECK(prefs != NULL);
+
+ WebCacheManager::RegisterPrefs(prefs);
PrefService* local_state = browser_process_->local_state();
local_state->RegisterStringPref(prefs::kApplicationLocale, L"");
local_state->RegisterBooleanPref(prefs::kMetricsReportingEnabled, false);
- browser::RegisterAllPrefs(prefs, local_state);
+ browser::RegisterLocalState(local_state);
// Override some settings to avoid hitting some preferences that have not
// been registered.