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

Side by Side Diff: base/power_monitor/power_monitor_unittest.cc

Issue 1466413002: Update gtest to 786564fa4a3c, switch to googlemock in gtest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/power_monitor/power_monitor.h" 5 #include "base/power_monitor/power_monitor.h"
6 #include "base/test/power_monitor_test_base.h" 6 #include "base/test/power_monitor_test_base.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/googletest/include/gtest/gtest.h"
8 8
9 namespace base { 9 namespace base {
10 10
11 class PowerMonitorTest : public testing::Test { 11 class PowerMonitorTest : public testing::Test {
12 protected: 12 protected:
13 PowerMonitorTest() { 13 PowerMonitorTest() {
14 power_monitor_source_ = new PowerMonitorTestSource(); 14 power_monitor_source_ = new PowerMonitorTestSource();
15 power_monitor_.reset(new PowerMonitor( 15 power_monitor_.reset(new PowerMonitor(
16 scoped_ptr<PowerMonitorSource>(power_monitor_source_))); 16 scoped_ptr<PowerMonitorSource>(power_monitor_source_)));
17 } 17 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 source()->GeneratePowerStateEvent(false); 71 source()->GeneratePowerStateEvent(false);
72 EXPECT_EQ(observers[0].power_state_changes(), 2); 72 EXPECT_EQ(observers[0].power_state_changes(), 2);
73 EXPECT_EQ(observers[0].last_power_state(), false); 73 EXPECT_EQ(observers[0].last_power_state(), false);
74 74
75 // Repeated indications the device is off battery power should be suppressed. 75 // Repeated indications the device is off battery power should be suppressed.
76 source()->GeneratePowerStateEvent(false); 76 source()->GeneratePowerStateEvent(false);
77 EXPECT_EQ(observers[0].power_state_changes(), 2); 77 EXPECT_EQ(observers[0].power_state_changes(), 2);
78 } 78 }
79 79
80 } // namespace base 80 } // namespace base
OLDNEW
« no previous file with comments | « base/posix/unix_domain_socket_linux_unittest.cc ('k') | base/prefs/default_pref_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698