Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: chrome/browser/metrics/chromeos_metrics_provider_unittest.cc

Issue 302153003: metrics: Shutdown LoginState after CrOSMetricsProvider tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/metrics/chromeos_metrics_provider.h" 5 #include "chrome/browser/metrics/chromeos_metrics_provider.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" 10 #include "chrome/browser/chromeos/login/users/fake_user_manager.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 fake_bluetooth_adapter_client_ = static_cast<FakeBluetoothAdapterClient*>( 74 fake_bluetooth_adapter_client_ = static_cast<FakeBluetoothAdapterClient*>(
75 DBusThreadManager::Get()->GetBluetoothAdapterClient()); 75 DBusThreadManager::Get()->GetBluetoothAdapterClient());
76 fake_bluetooth_device_client_ = static_cast<FakeBluetoothDeviceClient*>( 76 fake_bluetooth_device_client_ = static_cast<FakeBluetoothDeviceClient*>(
77 DBusThreadManager::Get()->GetBluetoothDeviceClient()); 77 DBusThreadManager::Get()->GetBluetoothDeviceClient());
78 78
79 // Initialize the login state trackers. 79 // Initialize the login state trackers.
80 if (!chromeos::LoginState::IsInitialized()) 80 if (!chromeos::LoginState::IsInitialized())
81 chromeos::LoginState::Initialize(); 81 chromeos::LoginState::Initialize();
82 } 82 }
83 83
84 virtual void TearDown() OVERRIDE { DBusThreadManager::Shutdown(); } 84 virtual void TearDown() OVERRIDE {
85 // Destroy the login state tracker if it was initialized.
86 chromeos::LoginState::Shutdown();
87
88 DBusThreadManager::Shutdown();
89 }
85 90
86 protected: 91 protected:
87 FakeBluetoothAdapterClient* fake_bluetooth_adapter_client_; 92 FakeBluetoothAdapterClient* fake_bluetooth_adapter_client_;
88 FakeBluetoothDeviceClient* fake_bluetooth_device_client_; 93 FakeBluetoothDeviceClient* fake_bluetooth_device_client_;
89 94
90 private: 95 private:
91 content::TestBrowserThreadBundle thread_bundle_; 96 content::TestBrowserThreadBundle thread_bundle_;
92 97
93 DISALLOW_COPY_AND_ASSIGN(ChromeOSMetricsProviderTest); 98 DISALLOW_COPY_AND_ASSIGN(ChromeOSMetricsProviderTest);
94 }; 99 };
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // Second device should match the Confirm Passkey object, this has 224 // Second device should match the Confirm Passkey object, this has
220 // no Device ID information. 225 // no Device ID information.
221 PairedDevice device2 = system_profile.hardware().bluetooth().paired_device(1); 226 PairedDevice device2 = system_profile.hardware().bluetooth().paired_device(1);
222 227
223 EXPECT_EQ(FakeBluetoothDeviceClient::kConfirmPasskeyClass, 228 EXPECT_EQ(FakeBluetoothDeviceClient::kConfirmPasskeyClass,
224 device2.bluetooth_class()); 229 device2.bluetooth_class());
225 EXPECT_EQ(PairedDevice::DEVICE_PHONE, device2.type()); 230 EXPECT_EQ(PairedDevice::DEVICE_PHONE, device2.type());
226 EXPECT_EQ(0x207D74U, device2.vendor_prefix()); 231 EXPECT_EQ(0x207D74U, device2.vendor_prefix());
227 EXPECT_EQ(PairedDevice::VENDOR_ID_UNKNOWN, device2.vendor_id_source()); 232 EXPECT_EQ(PairedDevice::VENDOR_ID_UNKNOWN, device2.vendor_id_source());
228 } 233 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698