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

Side by Side Diff: content/browser/power_monitor_message_broadcaster_unittest.cc

Issue 678073006: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/test/power_monitor_test_base.h" 5 #include "base/test/power_monitor_test_base.h"
6 #include "content/browser/power_monitor_message_broadcaster.h" 6 #include "content/browser/power_monitor_message_broadcaster.h"
7 #include "content/common/power_monitor_messages.h" 7 #include "content/common/power_monitor_messages.h"
8 #include "ipc/ipc_sender.h" 8 #include "ipc/ipc_sender.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 int resumes_; // Count of OnResume notifications. 46 int resumes_; // Count of OnResume notifications.
47 }; 47 };
48 48
49 class PowerMonitorMessageBroadcasterTest : public testing::Test { 49 class PowerMonitorMessageBroadcasterTest : public testing::Test {
50 protected: 50 protected:
51 PowerMonitorMessageBroadcasterTest() { 51 PowerMonitorMessageBroadcasterTest() {
52 power_monitor_source_ = new base::PowerMonitorTestSource(); 52 power_monitor_source_ = new base::PowerMonitorTestSource();
53 power_monitor_.reset(new base::PowerMonitor( 53 power_monitor_.reset(new base::PowerMonitor(
54 scoped_ptr<base::PowerMonitorSource>(power_monitor_source_))); 54 scoped_ptr<base::PowerMonitorSource>(power_monitor_source_)));
55 } 55 }
56 virtual ~PowerMonitorMessageBroadcasterTest() {}; 56 ~PowerMonitorMessageBroadcasterTest() override{};
nasko 2014/10/27 21:06:39 nit: shouldn't there be space between override and
dcheng 2014/10/27 22:00:12 Oh. It's because of the superfluous semicolon. I'l
57 57
58 base::PowerMonitorTestSource* source() { return power_monitor_source_; } 58 base::PowerMonitorTestSource* source() { return power_monitor_source_; }
59 base::PowerMonitor* monitor() { return power_monitor_.get(); } 59 base::PowerMonitor* monitor() { return power_monitor_.get(); }
60 60
61 private: 61 private:
62 base::PowerMonitorTestSource* power_monitor_source_; 62 base::PowerMonitorTestSource* power_monitor_source_;
63 scoped_ptr<base::PowerMonitor> power_monitor_; 63 scoped_ptr<base::PowerMonitor> power_monitor_;
64 64
65 DISALLOW_COPY_AND_ASSIGN(PowerMonitorMessageBroadcasterTest); 65 DISALLOW_COPY_AND_ASSIGN(PowerMonitorMessageBroadcasterTest);
66 }; 66 };
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Pretend the device has gone off battery power 104 // Pretend the device has gone off battery power
105 source()->GeneratePowerStateEvent(false); 105 source()->GeneratePowerStateEvent(false);
106 EXPECT_EQ(sender.power_state_changes(), 3); 106 EXPECT_EQ(sender.power_state_changes(), 3);
107 107
108 // Repeated indications the device is off battery power should be suppressed. 108 // Repeated indications the device is off battery power should be suppressed.
109 source()->GeneratePowerStateEvent(false); 109 source()->GeneratePowerStateEvent(false);
110 EXPECT_EQ(sender.power_state_changes(), 3); 110 EXPECT_EQ(sender.power_state_changes(), 3);
111 } 111 }
112 112
113 } // namespace base 113 } // namespace base
OLDNEW
« no previous file with comments | « content/browser/plugin_loader_posix_unittest.cc ('k') | content/browser/power_profiler/power_profiler_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698