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

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

Issue 2618333006: [tools/perf] Fix JavaScript interpolation in action_runner calls (Closed)
Patch Set: fix a few more interpolations Created 3 years, 11 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/todomvc.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 from telemetry.page import page as page_module 4 from telemetry.page import page as page_module
5 from telemetry.page import shared_page_state 5 from telemetry.page import shared_page_state
6 from telemetry import story 6 from telemetry import story
7 7
8 8
9 def _GetCurrentLocation(action_runner): 9 def _GetCurrentLocation(action_runner):
10 return action_runner.EvaluateJavaScript('document.location.href') 10 return action_runner.EvaluateJavaScript('document.location.href')
11 11
12 12
13 def _WaitForLocationChange(action_runner, old_href): 13 def _WaitForLocationChange(action_runner, old_href):
14 # TODO(catapult:#3028): Fix interpolation of JavaScript values.
15 action_runner.WaitForJavaScriptCondition( 14 action_runner.WaitForJavaScriptCondition(
16 'document.location.href != "%s"' % old_href) 15 'document.location.href != {{ old_href }}', old_href=old_href)
17 16
18 17
19 class Top7StressPage(page_module.Page): 18 class Top7StressPage(page_module.Page):
20 19
21 def __init__(self, url, page_set, name=''): 20 def __init__(self, url, page_set, name=''):
22 super(Top7StressPage, self).__init__( 21 super(Top7StressPage, self).__init__(
23 url=url, page_set=page_set, name=name, 22 url=url, page_set=page_set, name=name,
24 shared_page_state_class=shared_page_state.SharedDesktopPageState, 23 shared_page_state_class=shared_page_state.SharedDesktopPageState,
25 credentials_path = 'data/credentials.json') 24 credentials_path = 'data/credentials.json')
26 self.archive_data_file = 'data/top_7_stress.json' 25 self.archive_data_file = 'data/top_7_stress.json'
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 archive_data_file='data/top_7_stress.json', 315 archive_data_file='data/top_7_stress.json',
317 cloud_storage_bucket=story.PARTNER_BUCKET) 316 cloud_storage_bucket=story.PARTNER_BUCKET)
318 317
319 self.AddStory(GoogleWebSearchPage(self)) 318 self.AddStory(GoogleWebSearchPage(self))
320 self.AddStory(GmailPage(self)) 319 self.AddStory(GmailPage(self))
321 self.AddStory(GoogleCalendarPage(self)) 320 self.AddStory(GoogleCalendarPage(self))
322 self.AddStory(GooglePlusPage(self)) 321 self.AddStory(GooglePlusPage(self))
323 self.AddStory(BlogspotPage(self)) 322 self.AddStory(BlogspotPage(self))
324 self.AddStory(WordpressPage(self)) 323 self.AddStory(WordpressPage(self))
325 self.AddStory(FacebookPage(self)) 324 self.AddStory(FacebookPage(self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/todomvc.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698