diff options
Diffstat (limited to 'chrome/test/unit/chrome_test_suite.h')
-rw-r--r-- | chrome/test/unit/chrome_test_suite.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/chrome/test/unit/chrome_test_suite.h b/chrome/test/unit/chrome_test_suite.h index 5f68e77..9432a03 100644 --- a/chrome/test/unit/chrome_test_suite.h +++ b/chrome/test/unit/chrome_test_suite.h @@ -20,17 +20,6 @@ public: ChromeTestSuite(int argc, char** argv) : TestSuite(argc, argv) { } - virtual ~ChromeTestSuite() { - ResourceBundle::CleanupSharedInstance(); - - delete g_browser_process; - g_browser_process = NULL; - - // Tear down shared StatsTable; prevents unit_tests from leaking it. - StatsTable::set_current(NULL); - delete stats_table_; - } - protected: virtual void Initialize() { @@ -44,7 +33,7 @@ protected: // NOTE: The user data directory will be erased before each UI test that // uses it, in order to ensure consistency. std::wstring user_data_dir = - parsed_command_line_.GetSwitchValue(switches::kUserDataDir); + CommandLine().GetSwitchValue(switches::kUserDataDir); if (user_data_dir.empty() && PathService::Get(base::DIR_EXE, &user_data_dir)) file_util::AppendToPath(&user_data_dir, L"test_user_data"); @@ -59,6 +48,19 @@ protected: StatsTable::set_current(stats_table_); } + virtual void Shutdown() { + ResourceBundle::CleanupSharedInstance(); + + delete g_browser_process; + g_browser_process = NULL; + + // Tear down shared StatsTable; prevents unit_tests from leaking it. + StatsTable::set_current(NULL); + delete stats_table_; + + TestSuite::Shutdown(); + } + StatsTable* stats_table_; }; |