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

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

Issue 1198823004: Update perf page_set to use story_set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « tools/perf/page_sets/mse_cases.py ('k') | tools/perf/page_sets/page_cycler/intl1.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 import time 4 import time
5 5
6 from telemetry import story
6 from telemetry.page import page as page_module 7 from telemetry.page import page as page_module
7 from telemetry.page import page_set as page_set_module
8 from telemetry.page import shared_page_state 8 from telemetry.page import shared_page_state
9 9
10 INTERACTION_NAME = 'Interaction.PageLoading' 10 INTERACTION_NAME = 'Interaction.PageLoading'
11 11
12 # How long to wait for the page to finish rendering. 12 # How long to wait for the page to finish rendering.
13 LOADING_DELAY_S = 5 13 LOADING_DELAY_S = 5
14 14
15 15
16 class NewTabPagePage(page_module.Page): 16 class NewTabPagePage(page_module.Page):
17 17
(...skipping 16 matching lines...) Expand all
34 # TODO(beaudoin): We have no guarantee the page has fully rendered and the 34 # TODO(beaudoin): We have no guarantee the page has fully rendered and the
35 # JS has fully executed at that point. The right way to do it would be to 35 # JS has fully executed at that point. The right way to do it would be to
36 # toggle a Javascript variable in the page code and to wait for it here. 36 # toggle a Javascript variable in the page code and to wait for it here.
37 # This should be done when window.performance.mark is supported and we 37 # This should be done when window.performance.mark is supported and we
38 # migrate to it instead of calling console.timeEnd here. If the test is 38 # migrate to it instead of calling console.timeEnd here. If the test is
39 # failing flakily, we should use a better heuristic. 39 # failing flakily, we should use a better heuristic.
40 action_runner.ExecuteJavaScript( 40 action_runner.ExecuteJavaScript(
41 "console.timeEnd('" + INTERACTION_NAME + "');") 41 "console.timeEnd('" + INTERACTION_NAME + "');")
42 42
43 43
44 class NewTabPagePageSet(page_set_module.PageSet): 44 class NewTabPagePageSet(story.StorySet):
45 def __init__(self): 45 def __init__(self):
46 super(NewTabPagePageSet, self).__init__( 46 super(NewTabPagePageSet, self).__init__(
47 archive_data_file='data/new_tab_page_page.json', 47 archive_data_file='data/new_tab_page_page.json',
48 bucket=page_set_module.PUBLIC_BUCKET) 48 cloud_storage_bucket=story.PUBLIC_BUCKET)
49 self.AddUserStory(NewTabPagePage(page_set=self)) 49 self.AddUserStory(NewTabPagePage(page_set=self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/mse_cases.py ('k') | tools/perf/page_sets/page_cycler/intl1.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698