| 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')
|
|
|
|
|
|
|