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

Unified Diff: build/android/pylib/device/battery_utils_test.py

Issue 1217223008: [Android] Add battery status reset to device temperature check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months 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 side-by-side diff with in-line comments
Download patch
Index: build/android/pylib/device/battery_utils_test.py
diff --git a/build/android/pylib/device/battery_utils_test.py b/build/android/pylib/device/battery_utils_test.py
index 0ca427d21bcf36af541bf8bb4dab9c4ebdd4f08d..c83a8fc5140b4b69f3734e41d0e03d67289e6158 100755
--- a/build/android/pylib/device/battery_utils_test.py
+++ b/build/android/pylib/device/battery_utils_test.py
@@ -372,12 +372,16 @@ class BatteryUtilsLetBatteryCoolToTemperatureTest(BatteryUtilsTest):
@mock.patch('time.sleep', mock.Mock())
def testLetBatteryCoolToTemperature_startUnder(self):
with self.assertCalls(
+ (self.call.device.RunShellCommand(
+ ['dumpsys', 'battery', 'reset'], check_return=True), []),
(self.call.battery.GetBatteryInfo(), {'temperature': '500'})):
self.battery.LetBatteryCoolToTemperature(600)
@mock.patch('time.sleep', mock.Mock())
def testLetBatteryCoolToTemperature_startOver(self):
with self.assertCalls(
+ (self.call.device.RunShellCommand(
+ ['dumpsys', 'battery', 'reset'], check_return=True), []),
(self.call.battery.GetBatteryInfo(), {'temperature': '500'}),
(self.call.battery.GetBatteryInfo(), {'temperature': '400'})):
self.battery.LetBatteryCoolToTemperature(400)
« build/android/pylib/device/battery_utils.py ('K') | « build/android/pylib/device/battery_utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698