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

Unified Diff: tools/telemetry/telemetry/page/page.py

Issue 22883011: Removing Page.WaitToLoad and update all pagesets to use explicit wait actions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Putting default navigate_steps inside page_set rather than page Created 7 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 | « tools/telemetry/telemetry/page/actions/wait.py ('k') | tools/telemetry/telemetry/page/page_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/page.py
diff --git a/tools/telemetry/telemetry/page/page.py b/tools/telemetry/telemetry/page/page.py
index 5d06076a53824fe89a10693b5938ce7b608282f6..145f036ae30c584f7412ad5fc96b91f8666dd365 100644
--- a/tools/telemetry/telemetry/page/page.py
+++ b/tools/telemetry/telemetry/page/page.py
@@ -3,10 +3,8 @@
# found in the LICENSE file.
import os
import re
-import time
import urlparse
-from telemetry.core import util
def _UrlPathJoin(*args):
"""Joins each path in |args| for insertion into a URL path.
@@ -111,30 +109,3 @@ class Page(object):
def __str__(self):
return self.url
-
- def WaitToLoad(self, tab, timeout, poll_interval=0.1):
- Page.WaitForPageToLoad(self, tab, timeout, poll_interval)
-
- # TODO(dtu): Remove this method when no page sets use a click interaction
- # with a wait condition. crbug.com/168431
- @staticmethod
- def WaitForPageToLoad(obj, tab, timeout, poll_interval=0.1):
- """Waits for various wait conditions present in obj."""
- if hasattr(obj, 'wait_seconds'):
- time.sleep(obj.wait_seconds)
- if hasattr(obj, 'wait_for_element_with_text'):
- callback_code = 'function(element) { return element != null; }'
- util.WaitFor(
- lambda: util.FindElementAndPerformAction(
- tab, obj.wait_for_element_with_text, callback_code),
- timeout, poll_interval)
- if hasattr(obj, 'wait_for_element_with_selector'):
- util.WaitFor(lambda: tab.EvaluateJavaScript(
- 'document.querySelector(\'' + obj.wait_for_element_with_selector +
- '\') != null'), timeout, poll_interval)
- if hasattr(obj, 'post_navigate_javascript_to_execute'):
- tab.EvaluateJavaScript(obj.post_navigate_javascript_to_execute)
- if hasattr(obj, 'wait_for_javascript_expression'):
- util.WaitFor(
- lambda: tab.EvaluateJavaScript(obj.wait_for_javascript_expression),
- timeout, poll_interval)
« no previous file with comments | « tools/telemetry/telemetry/page/actions/wait.py ('k') | tools/telemetry/telemetry/page/page_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698