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

Unified Diff: telemetry/telemetry/internal/backends/chrome_inspector/inspector_runtime_unittest.py

Issue 2453073002: [Telemetry] Move from telemetry WaitFor to py_utils WaitFor (Closed)
Patch Set: [Telemetry] Move from telemetry WaitFor to py_utils WaitFor Created 4 years, 2 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/internal/backends/chrome_inspector/inspector_runtime_unittest.py
diff --git a/telemetry/telemetry/internal/backends/chrome_inspector/inspector_runtime_unittest.py b/telemetry/telemetry/internal/backends/chrome_inspector/inspector_runtime_unittest.py
index b20252125c1b34ee81c751e2e73511b29ecc01da..0e0e565d298ae050b9ede2454fbe3fe1636f127b 100644
--- a/telemetry/telemetry/internal/backends/chrome_inspector/inspector_runtime_unittest.py
+++ b/telemetry/telemetry/internal/backends/chrome_inspector/inspector_runtime_unittest.py
@@ -3,9 +3,10 @@
# found in the LICENSE file.
from telemetry.core import exceptions
-from telemetry.core import util
from telemetry.testing import tab_test_case
+import py_utils
+
class InspectorRuntimeTest(tab_test_case.TabTestCase):
def testRuntimeEvaluateSimple(self):
@@ -42,7 +43,7 @@ class InspectorRuntimeTest(tab_test_case.TabTestCase):
test_defined_js = "typeof(testVar) != 'undefined'"
self._tab.WaitForJavaScriptExpression(test_defined_js, timeout=10)
- util.WaitFor(lambda: self._tab.EnableAllContexts() != starting_contexts,
+ py_utils.WaitFor(lambda: self._tab.EnableAllContexts() != starting_contexts,
timeout=10)
self.assertEquals(self._tab.EvaluateJavaScript('testVar'), 'host')
@@ -59,7 +60,7 @@ class InspectorRuntimeTest(tab_test_case.TabTestCase):
def TestVar(context_id):
"""Waits for testVar and the context to be ready, then returns the value
of testVar."""
- util.WaitFor(lambda: TestVarReady(context_id), timeout=10)
+ py_utils.WaitFor(lambda: TestVarReady(context_id), timeout=10)
return self._tab.EvaluateJavaScriptInContext('testVar', context_id)
all_contexts = self._tab.EnableAllContexts()

Powered by Google App Engine
This is Rietveld 408576698