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

Side by Side Diff: components/metrics/gpu/gpu_metrics_provider_unittest.cc

Issue 523273003: Moves GPUMetricsProvider to //components/metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 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
« no previous file with comments | « components/metrics/gpu/gpu_metrics_provider.cc ('k') | 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/gpu_metrics_provider.h" 5 #include "components/metrics/gpu/gpu_metrics_provider.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "components/metrics/proto/chrome_user_metrics_extension.pb.h" 8 #include "components/metrics/proto/chrome_user_metrics_extension.pb.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/gfx/size.h" 10 #include "ui/gfx/size.h"
11 11
12 namespace metrics {
13
12 namespace { 14 namespace {
13 15
14 const int kScreenWidth = 1024; 16 const int kScreenWidth = 1024;
15 const int kScreenHeight = 768; 17 const int kScreenHeight = 768;
16 const int kScreenCount = 3; 18 const int kScreenCount = 3;
17 const float kScreenScaleFactor = 2; 19 const float kScreenScaleFactor = 2;
18 20
19 class TestGPUMetricsProvider : public GPUMetricsProvider { 21 class TestGPUMetricsProvider : public GPUMetricsProvider {
20 public: 22 public:
21 TestGPUMetricsProvider() {} 23 TestGPUMetricsProvider() {}
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 provider.ProvideSystemProfileMetrics(uma_proto.mutable_system_profile()); 57 provider.ProvideSystemProfileMetrics(uma_proto.mutable_system_profile());
56 58
57 // Check that the system profile has the correct values set. 59 // Check that the system profile has the correct values set.
58 const metrics::SystemProfileProto::Hardware& hardware = 60 const metrics::SystemProfileProto::Hardware& hardware =
59 uma_proto.system_profile().hardware(); 61 uma_proto.system_profile().hardware();
60 EXPECT_EQ(kScreenWidth, hardware.primary_screen_width()); 62 EXPECT_EQ(kScreenWidth, hardware.primary_screen_width());
61 EXPECT_EQ(kScreenHeight, hardware.primary_screen_height()); 63 EXPECT_EQ(kScreenHeight, hardware.primary_screen_height());
62 EXPECT_EQ(kScreenScaleFactor, hardware.primary_screen_scale_factor()); 64 EXPECT_EQ(kScreenScaleFactor, hardware.primary_screen_scale_factor());
63 EXPECT_EQ(kScreenCount, hardware.screen_count()); 65 EXPECT_EQ(kScreenCount, hardware.screen_count());
64 } 66 }
67
68 } // namespace metrics
OLDNEW
« no previous file with comments | « components/metrics/gpu/gpu_metrics_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698