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

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

Issue 378803002: Add a history state update example to key_silk_cases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved to a local file Created 6 years, 5 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 | tools/perf/page_sets/key_silk_cases/pushState.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/key_silk_cases.py
diff --git a/tools/perf/page_sets/key_silk_cases.py b/tools/perf/page_sets/key_silk_cases.py
index 94efe3f4b8dd4cb64f65979ee503541e90d27b2d..deb6906fe5597752f5ff5c328da1ed5ccb9fe27b 100644
--- a/tools/perf/page_sets/key_silk_cases.py
+++ b/tools/perf/page_sets/key_silk_cases.py
@@ -589,6 +589,33 @@ class SVGIconRaster(KeySilkCasesPage):
action_runner.Wait(1)
interaction.End()
+
+class UpdateHistoryState(KeySilkCasesPage):
+
+ """ Why: Modern apps often update history state, which currently is janky."""
+
+ def __init__(self, page_set):
+ super(UpdateHistoryState, self).__init__(
+ url='file://key_silk_cases/pushState.html',
+ page_set=page_set)
+
+ def RunNavigateSteps(self, action_runner):
+ action_runner.NavigateToPage(self)
+ action_runner.ExecuteJavaScript('''
+ window.requestAnimationFrame(function() {
+ window.__history_state_loaded = true;
+ });
+ ''')
+ action_runner.WaitForJavaScriptCondition(
+ 'window.__history_state_loaded == true;')
+
+ def RunSmoothness(self, action_runner):
+ interaction = action_runner.BeginInteraction('animation_interaction',
+ is_smooth=True)
+ action_runner.Wait(5) # JS runs the animation continuously on the page
+ interaction.End()
+
+
class KeySilkCasesPageSet(page_set_module.PageSet):
""" Pages hand-picked for project Silk. """
@@ -627,3 +654,4 @@ class KeySilkCasesPageSet(page_set_module.PageSet):
self.AddPage(Page25(self))
self.AddPage(Page26(self))
self.AddPage(SVGIconRaster(self))
+ self.AddPage(UpdateHistoryState(self))
« no previous file with comments | « no previous file | tools/perf/page_sets/key_silk_cases/pushState.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698