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

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

Issue 684513002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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
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 "components/metrics/gpu/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"
(...skipping 24 matching lines...) Expand all
35 int GetScreenCount() const override { return kScreenCount; } 35 int GetScreenCount() const override { return kScreenCount; }
36 36
37 DISALLOW_COPY_AND_ASSIGN(TestGPUMetricsProvider); 37 DISALLOW_COPY_AND_ASSIGN(TestGPUMetricsProvider);
38 }; 38 };
39 39
40 } // namespace 40 } // namespace
41 41
42 class GPUMetricsProviderTest : public testing::Test { 42 class GPUMetricsProviderTest : public testing::Test {
43 public: 43 public:
44 GPUMetricsProviderTest() {} 44 GPUMetricsProviderTest() {}
45 virtual ~GPUMetricsProviderTest() {} 45 ~GPUMetricsProviderTest() override {}
46 46
47 private: 47 private:
48 DISALLOW_COPY_AND_ASSIGN(GPUMetricsProviderTest); 48 DISALLOW_COPY_AND_ASSIGN(GPUMetricsProviderTest);
49 }; 49 };
50 50
51 TEST_F(GPUMetricsProviderTest, ProvideSystemProfileMetrics) { 51 TEST_F(GPUMetricsProviderTest, ProvideSystemProfileMetrics) {
52 TestGPUMetricsProvider provider; 52 TestGPUMetricsProvider provider;
53 ChromeUserMetricsExtension uma_proto; 53 ChromeUserMetricsExtension uma_proto;
54 54
55 provider.ProvideSystemProfileMetrics(uma_proto.mutable_system_profile()); 55 provider.ProvideSystemProfileMetrics(uma_proto.mutable_system_profile());
56 56
57 // Check that the system profile has the correct values set. 57 // Check that the system profile has the correct values set.
58 const SystemProfileProto::Hardware& hardware = 58 const SystemProfileProto::Hardware& hardware =
59 uma_proto.system_profile().hardware(); 59 uma_proto.system_profile().hardware();
60 EXPECT_EQ(kScreenWidth, hardware.primary_screen_width()); 60 EXPECT_EQ(kScreenWidth, hardware.primary_screen_width());
61 EXPECT_EQ(kScreenHeight, hardware.primary_screen_height()); 61 EXPECT_EQ(kScreenHeight, hardware.primary_screen_height());
62 EXPECT_EQ(kScreenScaleFactor, hardware.primary_screen_scale_factor()); 62 EXPECT_EQ(kScreenScaleFactor, hardware.primary_screen_scale_factor());
63 EXPECT_EQ(kScreenCount, hardware.screen_count()); 63 EXPECT_EQ(kScreenCount, hardware.screen_count());
64 } 64 }
65 65
66 } // namespace metrics 66 } // namespace metrics
OLDNEW
« no previous file with comments | « components/login/screens/screen_context_unittest.cc ('k') | components/metrics/metrics_log_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698