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

Unified Diff: tools/perf/page_sets/polymer.py

Issue 439893002: swap timed wait for whenPolymerReady function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rolled out commit accidentally included Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/polymer.py
diff --git a/tools/perf/page_sets/polymer.py b/tools/perf/page_sets/polymer.py
index 9a7ff97f43fd5a620c130bfd4d440ba64565f44e..45802c302c30982e89f0011856c12b69bda097f6 100644
--- a/tools/perf/page_sets/polymer.py
+++ b/tools/perf/page_sets/polymer.py
@@ -112,9 +112,16 @@ class PolymerSampler(PolymerPage):
#FIXME(wiltzius) workaround for crbug.com/391672
action_runner.ExecuteJavaScript('window.location.href="about:blank";')
super(PolymerSampler, self).RunNavigateSteps(action_runner)
- #FIXME(wiltzius) this should wait for iframe to load and all load
- # animations to end
- action_runner.Wait(5)
+ waitForLoadJS = """
+ window.Polymer.whenPolymerReady(function() {
+ %s.contentWindow.Polymer.whenPolymerReady(function() {
+ window.__polymer_ready = true;
+ })
+ });
+ """ % self.iframe_js
+ action_runner.ExecuteJavaScript(waitForLoadJS)
+ action_runner.WaitForJavaScriptCondition(
+ 'window.__polymer_ready')
def RunSmoothness(self, action_runner):
#TODO(wiltzius) Add interactions for input elements and shadow pages
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698