Chromium Code Reviews| Index: tools/perf/page_sets/todomvc.py |
| diff --git a/tools/perf/page_sets/todomvc.py b/tools/perf/page_sets/todomvc.py |
| index 5536c83f3fbbcd5742641fc88215c03413a90fd1..a7eaf09258d6ff57c074cd6c9e5f7b7cf095a46b 100644 |
| --- a/tools/perf/page_sets/todomvc.py |
| +++ b/tools/perf/page_sets/todomvc.py |
| @@ -19,6 +19,8 @@ URL_LIST = [ |
| ('Vanilla JS', 'http://todomvc.com/examples/vanillajs'), |
| ] |
| +INTERACTION_NAME = "Interaction.PageLoading" |
|
Sami
2016/03/10 12:30:34
nit: Single quote strings please.
|
| + |
| class TodoMVCPage(page_module.Page): |
| @@ -26,9 +28,20 @@ class TodoMVCPage(page_module.Page): |
| super(TodoMVCPage, self).__init__( |
| url=url, page_set=page_set, name=name, |
| shared_page_state_class=shared_page_state.SharedDesktopPageState) |
| + self.script_to_evaluate_on_commit = ( |
| + "console.time('" + INTERACTION_NAME + "');") |
|
Sami
2016/03/10 12:30:34
nit: How about creating an action_runner.Interacti
jochen (gone - plz use gerrit)
2016/03/10 14:09:22
there is no action runner that would live long eno
|
| def RunPageInteractions(self, action_runner): |
| - pass |
| + action_runner.ExecuteJavaScript( |
| + """ |
| + this.hasRunRAF = 0; |
| + requestAnimationFrame(function() { |
|
jochen (gone - plz use gerrit)
2016/03/10 11:41:45
i wonder whether the page load interaction should
Sami
2016/03/10 12:30:34
I'm wondering if both are a little early for some
Camillo Bruni
2016/03/10 12:30:55
It should probably end with window.onLoad, since y
Camillo Bruni
2016/03/10 15:12:53
how about just waiting 4 seconds or so?
|
| + this.hasRunRAF = 1; |
| + console.timeEnd('%s'); |
| + }); |
| + """ % INTERACTION_NAME |
| + ) |
| + action_runner.WaitForJavaScriptCondition("this.hasRunRAF == 1") |
| class TodoMVCPageSet(story.StorySet): |