Commit edf3a853 authored by sque@chromium.org's avatar sque@chromium.org

metrics: call LoginState::Shutdown() at end of unit tests

These need to balance out the calls to LoginState::Initialize().

BUG=chromium:379140
TEST=unit tests pass
Signed-off-by: default avatarSimon Que <sque@chromium.org>

Review URL: https://codereview.chromium.org/310493002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274109 0039d316-1c4b-4281-b951-d872f2087c98
parent d949b083
...@@ -123,6 +123,14 @@ class MetricsLogTest : public testing::Test { ...@@ -123,6 +123,14 @@ class MetricsLogTest : public testing::Test {
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
} }
virtual ~MetricsLogTest() {
#if defined(OS_CHROMEOS)
// TODO(blundell): Remove this code once MetricsService no longer creates
// ChromeOSMetricsProvider.
chromeos::LoginState::Shutdown();
#endif // defined(OS_CHROMEOS)
}
protected: protected:
// Check that the values in |system_values| correspond to the test data // Check that the values in |system_values| correspond to the test data
// defined at the top of this file. // defined at the top of this file.
......
...@@ -81,6 +81,11 @@ class MetricsServiceTest : public testing::Test { ...@@ -81,6 +81,11 @@ class MetricsServiceTest : public testing::Test {
virtual ~MetricsServiceTest() { virtual ~MetricsServiceTest() {
MetricsService::SetExecutionPhase(MetricsService::UNINITIALIZED_PHASE, MetricsService::SetExecutionPhase(MetricsService::UNINITIALIZED_PHASE,
GetLocalState()); GetLocalState());
#if defined(OS_CHROMEOS)
// TODO(blundell): Remove this code once MetricsService no longer creates
// ChromeOSMetricsProvider.
chromeos::LoginState::Shutdown();
#endif // defined(OS_CHROMEOS)
} }
metrics::MetricsStateManager* GetMetricsStateManager() { metrics::MetricsStateManager* GetMetricsStateManager() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment