[tools/perf] Remove usages of deprecated telemetry.core.util.WaitFor
Replaced with py_utils.WaitFor
Bug: 977594
Change-Id: I7418dc2da07203c565d0ecc9ad08fdbf7bba821b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670878
Commit-Queue: Juan Antonio Navarro Pérez <perezju@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Auto-Submit: Juan Antonio Navarro Pérez <perezju@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#671372}
diff --git a/tools/perf/core/minidump_unittest.py b/tools/perf/core/minidump_unittest.py
index d4ffac5..2ad6cf4 100644
--- a/tools/perf/core/minidump_unittest.py
+++ b/tools/perf/core/minidump_unittest.py
@@ -7,7 +7,9 @@
from telemetry.testing import tab_test_case
from telemetry import decorators
-from telemetry.core import util
+
+import py_utils
+
class BrowserMinidumpTest(tab_test_case.TabTestCase):
@decorators.Isolated
@@ -131,4 +133,4 @@
script_to_evaluate_on_commit=script)
# Wait until the javascript has run ensuring that
# the new browser has restarted before we crash it again
- util.WaitFor(lambda: new_tab.EvaluateJavaScript(value), 60)
+ py_utils.WaitFor(lambda: new_tab.EvaluateJavaScript(value), 60)
diff --git a/tools/perf/page_sets/login_helpers/chrome_login.py b/tools/perf/page_sets/login_helpers/chrome_login.py
index 33dad0fc..1f76c3f 100644
--- a/tools/perf/page_sets/login_helpers/chrome_login.py
+++ b/tools/perf/page_sets/login_helpers/chrome_login.py
@@ -3,9 +3,10 @@
# found in the LICENSE file.
from page_sets.login_helpers import login_utils
-from telemetry.core import util
from telemetry.page import action_runner as action_runner_module
+import py_utils
+
def GetGaiaContext(tab):
"""Returns Gaia's login page context."""
@@ -39,7 +40,7 @@
# Get the Gaia webview context within the sign in extension to create a Gaia
# action_runner. The action runner will then execute JS in the Gaia context.
- gaia_context = util.WaitFor(lambda: GetGaiaContext(action_runner.tab), 5)
+ gaia_context = py_utils.WaitFor(lambda: GetGaiaContext(action_runner.tab), 5)
if not gaia_context:
raise RuntimeError('Can not find GAIA webview context for sign in.')
gaia_action_runner = action_runner_module.ActionRunner(gaia_context)