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

Unified Diff: tools/perf/page_sets/tough_ad_cases.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
« no previous file with comments | « tools/perf/page_sets/top_pages.py ('k') | tools/perf/page_sets/tough_animation_cases.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/tough_ad_cases.py
diff --git a/tools/perf/page_sets/tough_ad_cases.py b/tools/perf/page_sets/tough_ad_cases.py
index 6ab88fc0a63ff2ec52a453521f1a9f6719e564f9..cf9635739fdb4bc5f75609d0e8b8b6a538970675 100644
--- a/tools/perf/page_sets/tough_ad_cases.py
+++ b/tools/perf/page_sets/tough_ad_cases.py
@@ -21,10 +21,10 @@ class SwiffyPage(page_module.Page):
util.WaitFor(action_runner.tab.HasReachedQuiescence, 60)
# Swiffy overwrites toString() to return a constant string, so "undo" that
# here so that we don't think it has stomped over console.time.
- action_runner.EvaluateJavaScript2(
+ action_runner.EvaluateJavaScript(
'Function.prototype.toString = function() { return "[native code]"; }')
# Make sure we have a reasonable viewport for mobile.
- action_runner.EvaluateJavaScript2("""
+ action_runner.EvaluateJavaScript("""
var meta = document.createElement("meta");
meta.name = "viewport";
meta.content = "width=device-width";
@@ -68,14 +68,14 @@ class AdPage(page_module.Page):
# Most ads have touch handlers and we want to simulate the worst case of the
# user trying to scroll the page by grabbing an ad.
if self._wait_for_interactive_or_better:
- action_runner.WaitForJavaScriptCondition2(
+ action_runner.WaitForJavaScriptCondition(
'(document.readyState == "interactive" || '
'document.readyState == "complete") &&'
'document.body != null && '
'document.body.scrollHeight > window.innerHeight && '
'!document.body.addEventListener("touchstart", function() {})')
else:
- action_runner.WaitForJavaScriptCondition2(
+ action_runner.WaitForJavaScriptCondition(
'document.body != null && '
'document.body.scrollHeight > window.innerHeight && '
'!document.body.addEventListener("touchstart", function() {})')
@@ -104,7 +104,7 @@ class ForbesAdPage(AdPage):
def RunNavigateSteps(self, action_runner):
super(ForbesAdPage, self).RunNavigateSteps(action_runner)
# Wait until the interstitial banner goes away.
- action_runner.WaitForJavaScriptCondition2(
+ action_runner.WaitForJavaScriptCondition(
'window.location.pathname.indexOf("welcome") == -1')
« no previous file with comments | « tools/perf/page_sets/top_pages.py ('k') | tools/perf/page_sets/tough_animation_cases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698