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

Side by Side Diff: tools/perf/page_sets/pica.py

Issue 255063002: copy the pica benchmark to polymer_load (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add NOTRY=true Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/perf/measurements/polymer_load.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 # pylint: disable=W0401,W0614 4 # pylint: disable=W0401,W0614
5 from telemetry.page.actions.all_page_actions import * 5 from telemetry.page.actions.all_page_actions import *
6 from telemetry.page import page as page_module 6 from telemetry.page import page as page_module
7 from telemetry.page import page_set as page_set_module 7 from telemetry.page import page_set as page_set_module
8 from measurements import polymer_load
8 9
9 10
10 class PicaPage(page_module.PageWithDefaultRunNavigate): 11 class PicaPage(polymer_load.PageForPolymerLoad):
11 12
12 def __init__(self, page_set): 13 def __init__(self, page_set):
13 super(PicaPage, self).__init__( 14 super(PicaPage, self).__init__(
14 url='http://localhost/polymer/projects/pica/', 15 url='http://localhost/polymer/projects/pica/',
15 page_set=page_set) 16 page_set=page_set)
16 self.archive_data_file = 'data/pica.json' 17 self.archive_data_file = 'data/pica.json'
17 self.script_to_evaluate_on_commit = '''
18 document.addEventListener('polymer-ready', function() {
19 var unused = document.body.offsetHeight;
20 window.__pica_load_time = performance.now();
21 setTimeout(function(){window.__polymer_ready=true}, 1000)
22 })'''
23
24 def RunNavigateSteps(self, action_runner):
25 action_runner.RunAction(NavigateAction())
26 action_runner.RunAction(WaitAction(
27 {
28 'javascript': 'window.__polymer_ready'
29 }))
30 18
31 19
32 class PicaPageSet(page_set_module.PageSet): 20 class PicaPageSet(page_set_module.PageSet):
33 21
34 """ Pica demo app for the Polymer UI toolkit """ 22 """ Pica demo app for the Polymer UI toolkit """
35 23
36 def __init__(self): 24 def __init__(self):
37 super(PicaPageSet, self).__init__( 25 super(PicaPageSet, self).__init__(
38 archive_data_file='data/pica.json') 26 archive_data_file='data/pica.json')
39 27
40 self.AddPage(PicaPage(self)) 28 self.AddPage(PicaPage(self))
OLDNEW
« no previous file with comments | « tools/perf/measurements/polymer_load.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698