OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <content/browser/background_sync/background_sync_power_observer.h> | 5 #include <content/browser/background_sync/background_sync_power_observer.h> |
6 | 6 |
| 7 #include "base/macros.h" |
7 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
8 #include "base/test/power_monitor_test_base.h" | 9 #include "base/test/power_monitor_test_base.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
10 | 11 |
11 namespace content { | 12 namespace content { |
12 | 13 |
13 namespace { | 14 namespace { |
14 | 15 |
15 class BackgroundSyncPowerObserverTest : public testing::Test { | 16 class BackgroundSyncPowerObserverTest : public testing::Test { |
16 protected: | 17 protected: |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 SetOnBatteryPower(false); | 63 SetOnBatteryPower(false); |
63 EXPECT_TRUE(power_observer_->PowerSufficient(POWER_STATE_AVOID_DRAINING)); | 64 EXPECT_TRUE(power_observer_->PowerSufficient(POWER_STATE_AVOID_DRAINING)); |
64 | 65 |
65 SetOnBatteryPower(true); | 66 SetOnBatteryPower(true); |
66 EXPECT_FALSE(power_observer_->PowerSufficient(POWER_STATE_AVOID_DRAINING)); | 67 EXPECT_FALSE(power_observer_->PowerSufficient(POWER_STATE_AVOID_DRAINING)); |
67 } | 68 } |
68 | 69 |
69 } // namespace | 70 } // namespace |
70 | 71 |
71 } // namespace content | 72 } // namespace content |
OLD | NEW |