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

Unified Diff: chrome/browser/metrics/metrics_log_unittest.cc

Issue 10825485: Record device scale factor in the metrics log (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/metrics/metrics_log.cc ('k') | chrome/common/metrics/proto/system_profile.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_log_unittest.cc
diff --git a/chrome/browser/metrics/metrics_log_unittest.cc b/chrome/browser/metrics/metrics_log_unittest.cc
index 8f970717deeb5d177e1b514a903183625f48094e..fa729893a503bbdfe0d9df6bd8b178af1be0e579 100644
--- a/chrome/browser/metrics/metrics_log_unittest.cc
+++ b/chrome/browser/metrics/metrics_log_unittest.cc
@@ -36,6 +36,7 @@ const int kSessionId = 127;
const int kScreenWidth = 1024;
const int kScreenHeight = 768;
const int kScreenCount = 3;
+const float kScreenScaleFactor = 2;
const chrome_variations::SelectedGroupId kFieldTrialIds[] = {
{37, 43},
{13, 47},
@@ -88,6 +89,10 @@ class TestMetricsLog : public MetricsLog {
return gfx::Size(kScreenWidth, kScreenHeight);
}
+ virtual float GetScreenDeviceScaleFactor() const OVERRIDE {
+ return kScreenScaleFactor;
+ }
+
virtual int GetScreenCount() const OVERRIDE {
return kScreenCount;
}
@@ -121,6 +126,13 @@ class MetricsLogTest : public testing::Test {
EXPECT_EQ(kFieldTrialIds[i].group, field_trial.group_id());
}
+ const metrics::SystemProfileProto::Hardware& hardware =
+ system_profile.hardware();
+ EXPECT_EQ(kScreenWidth, hardware.primary_screen_width());
+ EXPECT_EQ(kScreenHeight, hardware.primary_screen_height());
+ EXPECT_EQ(kScreenScaleFactor, hardware.primary_screen_scale_factor());
+ EXPECT_EQ(kScreenCount, hardware.screen_count());
+
// TODO(isherman): Verify other data written into the protobuf as a result
// of this call.
}
« no previous file with comments | « chrome/browser/metrics/metrics_log.cc ('k') | chrome/common/metrics/proto/system_profile.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698