diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-20 19:41:02 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-20 19:41:02 +0000 |
commit | c3dc5b001539f6c4ae901ea7824b4abbd90ec655 (patch) | |
tree | cf6b10a47fccb931aae959b286c93c19ca4a2e82 /chrome_frame/test | |
parent | ae780c8ff8cf7a6ee227beb8e7c6837f4933b02c (diff) | |
download | chromium_src-c3dc5b001539f6c4ae901ea7824b4abbd90ec655.zip chromium_src-c3dc5b001539f6c4ae901ea7824b4abbd90ec655.tar.gz chromium_src-c3dc5b001539f6c4ae901ea7824b4abbd90ec655.tar.bz2 |
Fix the ChromeFrame net tests dchecks in debug builds due to a missing AtExitManager instance.
The AtExitManager instance is initialized by the NetTestSuite class constructor. The dchecks fire
because the NotificationService constructor uses the lazy instance class which relies on the AtExitManager
instance being initialized.
The fix is to initialize the NotificationService instance after the NetTestSuite constructor has done its job.
BUG=none
TEST=chrome frame net tests should pass in debug builds.
TBR=jam
Review URL: http://codereview.chromium.org/7981011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101994 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test')
-rw-r--r-- | chrome_frame/test/net/fake_external_tab.cc | 5 | ||||
-rw-r--r-- | chrome_frame/test/net/fake_external_tab.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc index b27d666..626c549 100644 --- a/chrome_frame/test/net/fake_external_tab.cc +++ b/chrome_frame/test/net/fake_external_tab.cc @@ -231,6 +231,9 @@ FakeExternalTab::~FakeExternalTab() { void FakeExternalTab::Initialize() { DCHECK(g_browser_process == NULL); + + notificaton_service_.reset(new NotificationService); + base::SystemMonitor system_monitor; icu_util::Initialize(); @@ -560,8 +563,6 @@ int main(int argc, char** argv) { google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad( InitializeCrashReporting(HEADLESS)); - NotificationService service; - // 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 diff --git a/chrome_frame/test/net/fake_external_tab.h b/chrome_frame/test/net/fake_external_tab.h index 25eb842..f93783a 100644 --- a/chrome_frame/test/net/fake_external_tab.h +++ b/chrome_frame/test/net/fake_external_tab.h @@ -21,6 +21,7 @@ #include "net/base/net_test_suite.h" class ProcessSingleton; +class NotificationService; class FakeExternalTab { public: @@ -44,6 +45,7 @@ class FakeExternalTab { FilePath overridden_user_dir_; FilePath user_data_dir_; scoped_ptr<ProcessSingleton> process_singleton_; + scoped_ptr<NotificationService> notificaton_service_; }; // The "master class" that spins the UI and test threads. |