Index: tools/telemetry/telemetry/unittest/options_for_unittests.py |
diff --git a/tools/telemetry/telemetry/unittest/options_for_unittests.py b/tools/telemetry/telemetry/unittest/options_for_unittests.py |
index 331e25017d5752f98b6f2fcf065bbf890a3b62ed..1c47fbfef732fe271a24cdb151acef2779e5603d 100644 |
--- a/tools/telemetry/telemetry/unittest/options_for_unittests.py |
+++ b/tools/telemetry/telemetry/unittest/options_for_unittests.py |
@@ -11,23 +11,22 @@ This allows multiple unit tests to use a specific |
browser, in face of multiple options.""" |
-_options = None |
+_options = [] |
-def Set(options): |
- global _options |
+def Push(options): |
+ _options.append(options) |
- _options = options |
+ |
+def Pop(): |
+ return _options.pop() |
def GetCopy(): |
- if not _options: |
+ if not AreSet(): |
return None |
- |
- return _options.Copy() |
+ return _options[-1].Copy() |
def AreSet(): |
- if _options: |
- return True |
- return False |
+ return bool(_options) |