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

Unified Diff: tools/perf/page_sets/system_health/loading_stories.py

Issue 2719853003: [Telemetry refactor] Drop "2" from method calls to JS API (Closed)
Patch Set: Created 3 years, 10 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: tools/perf/page_sets/system_health/loading_stories.py
diff --git a/tools/perf/page_sets/system_health/loading_stories.py b/tools/perf/page_sets/system_health/loading_stories.py
index 14196c9dc226821e46d3793d3eaded8791c1a4c8..f3ab950d6bcff18cdc81910a676a3992f380800f 100644
--- a/tools/perf/page_sets/system_health/loading_stories.py
+++ b/tools/perf/page_sets/system_health/loading_stories.py
@@ -198,7 +198,7 @@ class LoadWashingtonPostMobileStory(_LoadingStory):
# window does not have a "Close" button, instead it has only a "Send link
# to phone" button. So on tablets we run with the popup window open. The
# popup is transparent, so this is mostly an aesthetical issue.
- has_button = action_runner.EvaluateJavaScript2(
+ has_button = action_runner.EvaluateJavaScript(
'!!document.querySelector({{ selector }})',
selector=self._CLOSE_BUTTON_SELECTOR)
if has_button:
@@ -253,7 +253,7 @@ class LoadFlickrStory(_LoadingStory):
def _DidLoadDocument(self, action_runner):
# Wait until the 'Recently tagged' view loads.
- action_runner.WaitForJavaScriptCondition2('''
+ action_runner.WaitForJavaScriptCondition('''
document.querySelector(
'.search-photos-everyone-trending-view .photo-list-view')
!== null''')
@@ -317,7 +317,7 @@ class LoadGmailDesktopStory(_LoadGmailBaseStory):
def _DidLoadDocument(self, action_runner):
# Wait until the UI loads.
- action_runner.WaitForJavaScriptCondition2(
+ action_runner.WaitForJavaScriptCondition(
'document.getElementById("loading").style.display === "none"')
@@ -328,7 +328,7 @@ class LoadGmailMobileStory(_LoadGmailBaseStory):
def _DidLoadDocument(self, action_runner):
# Wait until the UI loads.
action_runner.WaitForElement('#apploadingdiv')
- action_runner.WaitForJavaScriptCondition2(
+ action_runner.WaitForJavaScriptCondition(
'document.getElementById("apploadingdiv").style.height === "0px"')
class LoadMapsStory(_LoadingStory):
@@ -378,7 +378,7 @@ class LoadBubblesStory(_LoadingStory):
def _DidLoadDocument(self, action_runner):
# The #logo element is removed right before the main menu is displayed.
- action_runner.WaitForJavaScriptCondition2(
+ action_runner.WaitForJavaScriptCondition(
'document.getElementById("logo") === null')
@@ -396,7 +396,7 @@ class LoadSpyChaseStory(_LoadingStory):
def _DidLoadDocument(self, action_runner):
# The background of the game canvas is set when the "Tap screen to play"
# caption is displayed.
- action_runner.WaitForJavaScriptCondition2(
+ action_runner.WaitForJavaScriptCondition(
'document.querySelector("#game canvas").style.background !== ""')
« no previous file with comments | « tools/perf/page_sets/system_health/browsing_stories.py ('k') | tools/perf/page_sets/system_health/long_running_stories.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698