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 "battery_status_dispatcher.h" | 5 #include "content/renderer/battery_status/battery_status_dispatcher.h" |
6 | 6 |
7 #include "content/public/test/mock_render_thread.h" | 7 #include "content/public/test/mock_render_thread.h" |
8 #include "content/public/test/test_utils.h" | 8 #include "content/public/test/test_utils.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "third_party/WebKit/public/platform/WebBatteryStatusListener.h" | 10 #include "third_party/WebKit/public/platform/WebBatteryStatusListener.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 class MockBatteryStatusListener : public blink::WebBatteryStatusListener { | 14 class MockBatteryStatusListener : public blink::WebBatteryStatusListener { |
15 public: | 15 public: |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 const blink::WebBatteryStatus& received_status = listener().status(); | 72 const blink::WebBatteryStatus& received_status = listener().status(); |
73 EXPECT_TRUE(listener().did_change_battery_status()); | 73 EXPECT_TRUE(listener().did_change_battery_status()); |
74 EXPECT_EQ(status.charging, received_status.charging); | 74 EXPECT_EQ(status.charging, received_status.charging); |
75 EXPECT_EQ(status.charging_time, received_status.chargingTime); | 75 EXPECT_EQ(status.charging_time, received_status.chargingTime); |
76 EXPECT_EQ(status.discharging_time, received_status.dischargingTime); | 76 EXPECT_EQ(status.discharging_time, received_status.dischargingTime); |
77 EXPECT_EQ(status.level, received_status.level); | 77 EXPECT_EQ(status.level, received_status.level); |
78 } | 78 } |
79 | 79 |
80 } // namespace content | 80 } // namespace content |
OLD | NEW |