| OLD | NEW |
| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/macros.h" |
| 6 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 7 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 8 #include "device/battery/battery_status_manager.h" | 9 #include "device/battery/battery_status_manager.h" |
| 9 #include "device/battery/battery_status_service.h" | 10 #include "device/battery/battery_status_service.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 12 |
| 12 namespace device { | 13 namespace device { |
| 13 | 14 |
| 14 namespace { | 15 namespace { |
| 15 | 16 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 EXPECT_EQ(1, callback2_invoked_count()); | 181 EXPECT_EQ(1, callback2_invoked_count()); |
| 181 | 182 |
| 182 subscription1.reset(); | 183 subscription1.reset(); |
| 183 battery_manager()->InvokeUpdateCallback(status); | 184 battery_manager()->InvokeUpdateCallback(status); |
| 184 base::RunLoop().RunUntilIdle(); | 185 base::RunLoop().RunUntilIdle(); |
| 185 EXPECT_EQ(1, callback1_invoked_count()); | 186 EXPECT_EQ(1, callback1_invoked_count()); |
| 186 EXPECT_EQ(2, callback2_invoked_count()); | 187 EXPECT_EQ(2, callback2_invoked_count()); |
| 187 } | 188 } |
| 188 | 189 |
| 189 } // namespace device | 190 } // namespace device |
| OLD | NEW |