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

Unified Diff: telemetry/telemetry/story/expectations.py

Issue 3002183002: [Telemetry] Add Nexus5x/Nexus6 webview disabling to StoryExpectations. (Closed)
Patch Set: switch name Created 3 years, 4 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
« no previous file with comments | « no previous file | telemetry/telemetry/story/expectations_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/story/expectations.py
diff --git a/telemetry/telemetry/story/expectations.py b/telemetry/telemetry/story/expectations.py
index 6db8d90526ce338ef8be92d0764297e4e9133a16..970f545cc2c5e5ebd2afd50a5af5221422477164 100644
--- a/telemetry/telemetry/story/expectations.py
+++ b/telemetry/telemetry/story/expectations.py
@@ -219,6 +219,20 @@ class _TestConditionByMacVersion(_TestCondition):
return False
return platform.GetOSVersionDetailString().startswith(self._version)
+
+class _TestConditionLogicalAndConditions(_TestCondition):
+ def __init__(self, conditions, name):
+ self._conditions = conditions
+ self._name = name
+
+ def __str__(self):
+ return self._name
+
+ def ShouldDisable(self, platform, finder_options):
+ return all(
+ c.ShouldDisable(platform, finder_options) for c in self._conditions)
+
+
ALL = _AllTestCondition()
ALL_MAC = _TestConditionByPlatformList(['mac'], 'Mac Platforms')
ALL_WIN = _TestConditionByPlatformList(['win'], 'Win Platforms')
@@ -243,3 +257,8 @@ MAC_10_11 = _TestConditionByMacVersion('10.11', 'Mac 10.11')
# Mac 10_12 Includes:
# Mac 10.12 Perf, Mac Mini 8GB 10.12 Perf
MAC_10_12 = _TestConditionByMacVersion('10.12', 'Mac 10.12')
+
+ANDROID_NEXUS6_WEBVIEW = _TestConditionLogicalAndConditions(
+ [ANDROID_NEXUS6, ANDROID_WEBVIEW], 'Nexus6 Webview')
+ANDROID_NEXUS5X_WEBVIEW = _TestConditionLogicalAndConditions(
+ [ANDROID_NEXUS5X, ANDROID_WEBVIEW], 'Nexus5X Webview')
« no previous file with comments | « no previous file | telemetry/telemetry/story/expectations_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698