summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 17:49:47 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 17:49:47 +0000
commitc63c6850aa6ce22029210a4ded2f4d14381925b4 (patch)
treefd00ff7ec8ca4ceb9037e3facc672e974e41ef38 /chrome_frame
parent046225c7905ef3a3390d88b399255c989d5d99d0 (diff)
downloadchromium_src-c63c6850aa6ce22029210a4ded2f4d14381925b4.zip
chromium_src-c63c6850aa6ce22029210a4ded2f4d14381925b4.tar.gz
chromium_src-c63c6850aa6ce22029210a4ded2f4d14381925b4.tar.bz2
Disable Chrome Frame net tests temporarily. There are least two DCHECKS that get triggered running locally and the tests appear to fail on related changes.
Also, they are not instantiating an AtExitManager early enough, so the call to chrome::RegisterPathProvider() may fail. This might have been reordered into a working state in some builds. Also, fix a call into profile code before registering certain needed preferences which causes a DCHECK. BUG=None TEST=None Review URL: http://codereview.chromium.org/6627009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76927 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/net/fake_external_tab.cc27
1 files changed, 18 insertions, 9 deletions
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc
index 788eebe..d38dc7c 100644
--- a/chrome_frame/test/net/fake_external_tab.cc
+++ b/chrome_frame/test/net/fake_external_tab.cc
@@ -223,6 +223,12 @@ void FakeExternalTab::Initialize() {
RenderProcessHost::set_run_renderer_in_process(true);
+ // Must register prefs before calling into the profile code.
+ PrefService* local_state = browser_process_->local_state();
+ local_state->RegisterStringPref(prefs::kApplicationLocale, "");
+ local_state->RegisterBooleanPref(prefs::kMetricsReportingEnabled, false);
+ browser::RegisterLocalState(local_state);
+
FilePath profile_path(ProfileManager::GetDefaultProfileDir(user_data()));
Profile* profile = g_browser_process->profile_manager()->GetProfile(
profile_path, false);
@@ -230,12 +236,6 @@ void FakeExternalTab::Initialize() {
DCHECK(prefs != NULL);
WebCacheManager::RegisterPrefs(prefs);
- PrefService* local_state = browser_process_->local_state();
- local_state->RegisterStringPref(prefs::kApplicationLocale, "");
- local_state->RegisterBooleanPref(prefs::kMetricsReportingEnabled, false);
-
- browser::RegisterLocalState(local_state);
-
// Override some settings to avoid hitting some preferences that have not
// been registered.
prefs->SetBoolean(prefs::kPasswordManagerEnabled, false);
@@ -498,14 +498,23 @@ int main(int argc, char** argv) {
if (chrome_frame_test::GetInstalledIEVersion() == IE_9) {
// Adding this here as the command line and the logging stuff gets
// initialized in the NetTestSuite constructor. Did not want to break that.
- base::AtExitManager at_exit_manager_;
+ base::AtExitManager at_exit_manager;
CommandLine::Init(argc, argv);
CFUrlRequestUnittestRunner::InitializeLogging();
LOG(INFO) << "Not running ChromeFrame net tests on IE9";
return 0;
}
- // Register paths needed by the ScopedChromeFrameRegistrar.
+ return 0;
+
+ // TODO(tommi): Stuff be broke. Needs a fixin'.
+#if 0
+ // This is awkward: the TestSuite derived CFUrlRequestUnittestRunner contains
+ // the instance of the AtExitManager that RegisterPathProvider() and others
+ // below require. So we have to instantiate this first.
+ CFUrlRequestUnittestRunner test_suite(argc, argv);
+
+ // Register paths needed by the ScopedChromeFrameRegistrar.
chrome::RegisterPathProvider();
ScopedChromeFrameRegistrar registrar(chrome_frame_test::GetTestBedType());
@@ -516,7 +525,7 @@ int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv);
FilterDisabledTests();
PluginService::EnableChromePlugins(false);
- CFUrlRequestUnittestRunner test_suite(argc, argv);
test_suite.RunMainUIThread();
return 0;
+#endif
}