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

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

Issue 17770005: Include CPU information in UMA system profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/port.h" 9 #include "base/port.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 EXPECT_EQ(kBrandForTesting, system_profile.brand_code()); 146 EXPECT_EQ(kBrandForTesting, system_profile.brand_code());
147 147
148 const metrics::SystemProfileProto::Hardware& hardware = 148 const metrics::SystemProfileProto::Hardware& hardware =
149 system_profile.hardware(); 149 system_profile.hardware();
150 EXPECT_EQ(kScreenWidth, hardware.primary_screen_width()); 150 EXPECT_EQ(kScreenWidth, hardware.primary_screen_width());
151 EXPECT_EQ(kScreenHeight, hardware.primary_screen_height()); 151 EXPECT_EQ(kScreenHeight, hardware.primary_screen_height());
152 EXPECT_EQ(kScreenScaleFactor, hardware.primary_screen_scale_factor()); 152 EXPECT_EQ(kScreenScaleFactor, hardware.primary_screen_scale_factor());
153 EXPECT_EQ(kScreenCount, hardware.screen_count()); 153 EXPECT_EQ(kScreenCount, hardware.screen_count());
154 154
155 ASSERT_TRUE(hardware.has_cpu());
156 EXPECT_TRUE(hardware.cpu().has_vendor_name());
157 EXPECT_TRUE(hardware.cpu().has_stepping());
158 EXPECT_TRUE(hardware.cpu().has_model());
159 EXPECT_TRUE(hardware.cpu().has_family());
160 EXPECT_TRUE(hardware.cpu().has_type());
161 EXPECT_TRUE(hardware.cpu().has_extended_model());
162 EXPECT_TRUE(hardware.cpu().has_extended_family());
163
155 // TODO(isherman): Verify other data written into the protobuf as a result 164 // TODO(isherman): Verify other data written into the protobuf as a result
156 // of this call. 165 // of this call.
157 } 166 }
158 167
159 virtual void SetUp() OVERRIDE { 168 virtual void SetUp() OVERRIDE {
160 #if defined(OS_CHROMEOS) 169 #if defined(OS_CHROMEOS)
161 mock_dbus_thread_manager_ = 170 mock_dbus_thread_manager_ =
162 new chromeos::MockDBusThreadManagerWithoutGMock(); 171 new chromeos::MockDBusThreadManagerWithoutGMock();
163 chromeos::DBusThreadManager::InitializeForTesting( 172 chromeos::DBusThreadManager::InitializeForTesting(
164 mock_dbus_thread_manager_); 173 mock_dbus_thread_manager_);
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 EXPECT_NE(std::string::npos, 364 EXPECT_NE(std::string::npos,
356 encoded.find(" childprocesscrashcount=\"10\"")); 365 encoded.find(" childprocesscrashcount=\"10\""));
357 EXPECT_EQ(std::string::npos, 366 EXPECT_EQ(std::string::npos,
358 encoded.find(" otherusercrashcount=")); 367 encoded.find(" otherusercrashcount="));
359 EXPECT_EQ(std::string::npos, 368 EXPECT_EQ(std::string::npos,
360 encoded.find(" kernelcrashcount=")); 369 encoded.find(" kernelcrashcount="));
361 EXPECT_EQ(std::string::npos, 370 EXPECT_EQ(std::string::npos,
362 encoded.find(" systemuncleanshutdowns=")); 371 encoded.find(" systemuncleanshutdowns="));
363 } 372 }
364 #endif // OS_CHROMEOS 373 #endif // OS_CHROMEOS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698