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

Unified Diff: telemetry/telemetry/testing/fakes/__init__.py

Issue 2843403005: [Telemetry] Add Expectation module that enables disabling benchmarks/stories (Closed)
Patch Set: 30 -> 50 Created 3 years, 7 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: telemetry/telemetry/testing/fakes/__init__.py
diff --git a/telemetry/telemetry/testing/fakes/__init__.py b/telemetry/telemetry/testing/fakes/__init__.py
index 9cfdbdabe514c5d6f0ae186c32fbde635c165280..0503ada9f7517c2ba23a361450c195836938eb1d 100644
--- a/telemetry/telemetry/testing/fakes/__init__.py
+++ b/telemetry/telemetry/testing/fakes/__init__.py
@@ -26,6 +26,8 @@ class FakePlatform(object):
def __init__(self):
self._network_controller = None
self._tracing_controller = None
+ self._has_battor = False
+ self._os_name = 'FakeOS'
@property
def is_host_platform(self):
@@ -61,8 +63,11 @@ class FakePlatform(object):
def GetArchName(self):
raise NotImplementedError
+ def SetOSName(self, name):
+ self._os_name = name
+
def GetOSName(self):
- return 'FakeOS'
+ return self._os_name
def GetOSVersionName(self):
raise NotImplementedError
@@ -73,6 +78,13 @@ class FakePlatform(object):
def WaitForBatteryTemperature(self, _):
pass
+ def HasBattOrConnected(self):
+ return self._has_battor
+
+ def SetBattOrDetected(self, b):
+ assert isinstance(b, bool)
+ self._has_battor = b
+
class FakeLinuxPlatform(FakePlatform):
def __init__(self):

Powered by Google App Engine
This is Rietveld 408576698