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

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

Issue 1767413002: [Telemetry] Cleanup some unused variables in page_sets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/blink_memory_mobile.py ('k') | tools/perf/page_sets/intl_ja_zh.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 4
5 from page_sets.login_helpers import google_login 5 from page_sets.login_helpers import google_login
6 6
7 from telemetry.page import page as page_module 7 from telemetry.page import page as page_module
8 from telemetry.page import shared_page_state 8 from telemetry.page import shared_page_state
9 9
10 import os 10 import os
11 11
12 def _DeterministicPerformanceCounters(): 12 def _DeterministicPerformanceCounters():
13 with open(os.path.join(os.path.dirname(__file__), 13 with open(os.path.join(os.path.dirname(__file__),
14 'deterministic_performance_counters.js')) as f: 14 'deterministic_performance_counters.js')) as f:
15 return f.read() 15 return f.read()
16 16
17 class GooglePages(page_module.Page): 17 class GooglePages(page_module.Page):
18 def __init__(self, url, page_set, shared_page_state_class, 18 def __init__(self, url, page_set, shared_page_state_class,
19 name='', credentials=None): 19 name='', credentials=None):
20 super(GooglePages, self).__init__( 20 super(GooglePages, self).__init__(
21 url=url, page_set=page_set, name=name, 21 url=url, page_set=page_set, name=name,
22 credentials_path='data/credentials.json', 22 credentials_path='data/credentials.json',
23 shared_page_state_class=shared_page_state_class) 23 shared_page_state_class=shared_page_state_class)
24 self.archive_data_file = 'data/google_pages.json'
25 self.credentials = credentials 24 self.credentials = credentials
26 self.script_to_evaluate_on_commit = _DeterministicPerformanceCounters() 25 self.script_to_evaluate_on_commit = _DeterministicPerformanceCounters()
27 26
28 27
29 class GmailPage(GooglePages): 28 class GmailPage(GooglePages):
30 def __init__(self, page_set, 29 def __init__(self, page_set,
31 shared_page_state_class=shared_page_state.SharedPageState): 30 shared_page_state_class=shared_page_state.SharedPageState):
32 super(GmailPage, self).__init__( 31 super(GmailPage, self).__init__(
33 url='https://mail.google.com/mail/', 32 url='https://mail.google.com/mail/',
34 page_set=page_set, 33 page_set=page_set,
(...skipping 16 matching lines...) Expand all
51 page_set=page_set, 50 page_set=page_set,
52 shared_page_state_class=shared_page_state_class) 51 shared_page_state_class=shared_page_state_class)
53 52
54 def RunNavigateSteps(self, action_runner): 53 def RunNavigateSteps(self, action_runner):
55 google_login.LoginGoogleAccount(action_runner, 'google', 54 google_login.LoginGoogleAccount(action_runner, 'google',
56 self.credentials_path) 55 self.credentials_path)
57 super(GoogleDocPage, self).RunNavigateSteps(action_runner) 56 super(GoogleDocPage, self).RunNavigateSteps(action_runner)
58 action_runner.Wait(2) 57 action_runner.Wait(2)
59 action_runner.WaitForJavaScriptCondition( 58 action_runner.WaitForJavaScriptCondition(
60 'document.getElementsByClassName("kix-appview-editor").length') 59 'document.getElementsByClassName("kix-appview-editor").length')
OLDNEW
« no previous file with comments | « tools/perf/page_sets/blink_memory_mobile.py ('k') | tools/perf/page_sets/intl_ja_zh.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698