Commit c0434db0 authored by Ned Nguyen's avatar Ned Nguyen Committed by Commit Bot

Remove credentials & credential_path from Telemetry page

Bug: 787500
Change-Id: I2966d90b7d9353c91f72b7bf09e1d5e6d120ebc3
Reviewed-on: https://chromium-review.googlesource.com/808544Reviewed-by: default avatarJuan Antonio Navarro Pérez <perezju@chromium.org>
Commit-Queue: Ned Nguyen <nednguyen@google.com>
Cr-Commit-Position: refs/heads/master@{#521690}
parent 66aaf201
...@@ -16,12 +16,10 @@ def _DeterministicPerformanceCounters(): ...@@ -16,12 +16,10 @@ def _DeterministicPerformanceCounters():
class GooglePages(page_module.Page): class GooglePages(page_module.Page):
def __init__(self, url, page_set, shared_page_state_class, def __init__(self, url, page_set, shared_page_state_class,
name='', credentials=None): name=''):
super(GooglePages, self).__init__( super(GooglePages, self).__init__(
url=url, page_set=page_set, name=name, url=url, page_set=page_set, name=name,
credentials_path='data/credentials.json',
shared_page_state_class=shared_page_state_class) shared_page_state_class=shared_page_state_class)
self.credentials = credentials
self.script_to_evaluate_on_commit = _DeterministicPerformanceCounters() self.script_to_evaluate_on_commit = _DeterministicPerformanceCounters()
...@@ -35,8 +33,7 @@ class GmailPage(GooglePages): ...@@ -35,8 +33,7 @@ class GmailPage(GooglePages):
name='https://mail.google.com/mail/') name='https://mail.google.com/mail/')
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
google_login.LoginGoogleAccount(action_runner, 'google', google_login.LoginGoogleAccount(action_runner, 'google')
self.credentials_path)
super(GmailPage, self).RunNavigateSteps(action_runner) super(GmailPage, self).RunNavigateSteps(action_runner)
action_runner.WaitForJavaScriptCondition( action_runner.WaitForJavaScriptCondition(
'window.gmonkey !== undefined &&' 'window.gmonkey !== undefined &&'
......
...@@ -10,14 +10,12 @@ from page_sets.login_helpers import google_login ...@@ -10,14 +10,12 @@ from page_sets.login_helpers import google_login
class KeyDesktopMoveCasesPage(page_module.Page): class KeyDesktopMoveCasesPage(page_module.Page):
def __init__(self, url, page_set, name='', credentials=None): def __init__(self, url, page_set, name=''):
if name == '': if name == '':
name = url name = url
super(KeyDesktopMoveCasesPage, self).__init__( super(KeyDesktopMoveCasesPage, self).__init__(
url=url, page_set=page_set, name=name, url=url, page_set=page_set, name=name,
credentials_path='data/credentials.json',
shared_page_state_class=shared_page_state.SharedDesktopPageState) shared_page_state_class=shared_page_state.SharedDesktopPageState)
self.credentials = credentials
class GmailMouseScrollPage(KeyDesktopMoveCasesPage): class GmailMouseScrollPage(KeyDesktopMoveCasesPage):
...@@ -37,8 +35,7 @@ class GmailMouseScrollPage(KeyDesktopMoveCasesPage): ...@@ -37,8 +35,7 @@ class GmailMouseScrollPage(KeyDesktopMoveCasesPage):
}''' }'''
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
google_login.LoginGoogleAccount(action_runner, 'googletest', google_login.LoginGoogleAccount(action_runner, 'googletest')
self.credentials_path)
super(GmailMouseScrollPage, self).RunNavigateSteps(action_runner) super(GmailMouseScrollPage, self).RunNavigateSteps(action_runner)
action_runner.WaitForJavaScriptCondition( action_runner.WaitForJavaScriptCondition(
'window.gmonkey !== undefined &&' 'window.gmonkey !== undefined &&'
......
...@@ -13,7 +13,7 @@ class KeyMobileSitesPage(page_module.Page): ...@@ -13,7 +13,7 @@ class KeyMobileSitesPage(page_module.Page):
super(KeyMobileSitesPage, self).__init__( super(KeyMobileSitesPage, self).__init__(
url=url, page_set=page_set, name=name, url=url, page_set=page_set, name=name,
shared_page_state_class=shared_page_state.SharedMobilePageState, shared_page_state_class=shared_page_state.SharedMobilePageState,
credentials_path='data/credentials.json', tags=tags) tags=tags)
class CapitolVolkswagenPage(KeyMobileSitesPage): class CapitolVolkswagenPage(KeyMobileSitesPage):
......
...@@ -28,8 +28,7 @@ class KeyMobileSitesSmoothPage(page_module.Page): ...@@ -28,8 +28,7 @@ class KeyMobileSitesSmoothPage(page_module.Page):
if name == '': if name == '':
name = url name = url
super(KeyMobileSitesSmoothPage, self).__init__( super(KeyMobileSitesSmoothPage, self).__init__(
url=url, page_set=page_set, name=name, url=url, page_set=page_set, name=name, tags=tags,
credentials_path='data/credentials.json', tags=tags,
shared_page_state_class=shared_page_state.SharedMobilePageState) shared_page_state_class=shared_page_state.SharedMobilePageState)
self.action_on_load_complete = action_on_load_complete self.action_on_load_complete = action_on_load_complete
......
...@@ -19,7 +19,7 @@ class KeySilkCasesPage(page_module.Page): ...@@ -19,7 +19,7 @@ class KeySilkCasesPage(page_module.Page):
if not name.startswith('http'): if not name.startswith('http'):
name = url.split('/')[-1] name = url.split('/')[-1]
super(KeySilkCasesPage, self).__init__( super(KeySilkCasesPage, self).__init__(
url=url, page_set=page_set, credentials_path = 'data/credentials.json', url=url, page_set=page_set,
shared_page_state_class=shared_page_state.SharedMobilePageState, shared_page_state_class=shared_page_state.SharedMobilePageState,
name=name) name=name)
self._run_no_page_interactions = run_no_page_interactions self._run_no_page_interactions = run_no_page_interactions
...@@ -467,8 +467,6 @@ class Page22(KeySilkCasesPage): ...@@ -467,8 +467,6 @@ class Page22(KeySilkCasesPage):
url='http://plus.google.com/app/basic/stream', url='http://plus.google.com/app/basic/stream',
page_set=page_set, run_no_page_interactions=run_no_page_interactions) page_set=page_set, run_no_page_interactions=run_no_page_interactions)
self.credentials = 'google'
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
super(Page22, self).RunNavigateSteps(action_runner) super(Page22, self).RunNavigateSteps(action_runner)
action_runner.WaitForJavaScriptCondition( action_runner.WaitForJavaScriptCondition(
......
...@@ -10,7 +10,7 @@ class PathologicalMobileSitesPage(page_module.Page): ...@@ -10,7 +10,7 @@ class PathologicalMobileSitesPage(page_module.Page):
def __init__(self, url, page_set): def __init__(self, url, page_set):
super(PathologicalMobileSitesPage, self).__init__( super(PathologicalMobileSitesPage, self).__init__(
url=url, page_set=page_set, credentials_path='data/credentials.json', url=url, page_set=page_set,
shared_page_state_class=shared_page_state.SharedMobilePageState, shared_page_state_class=shared_page_state.SharedMobilePageState,
name=url) name=url)
......
...@@ -13,7 +13,6 @@ class SimplePage(page_module.Page): ...@@ -13,7 +13,6 @@ class SimplePage(page_module.Page):
url=url, url=url,
page_set=page_set, page_set=page_set,
shared_page_state_class=shared_page_state.Shared10InchTabletPageState, shared_page_state_class=shared_page_state.Shared10InchTabletPageState,
credentials_path='data/credentials.json',
name=url) name=url)
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
......
...@@ -7,14 +7,12 @@ from telemetry import story ...@@ -7,14 +7,12 @@ from telemetry import story
class SimplePage(page_module.Page): class SimplePage(page_module.Page):
def __init__(self, url, page_set, credentials='', name=''): def __init__(self, url, page_set, name=''):
if name == '': if name == '':
name = url name = url
super(SimplePage, self).__init__( super(SimplePage, self).__init__(
url, page_set=page_set, name=name, url, page_set=page_set, name=name,
credentials_path='data/credentials.json',
shared_page_state_class=shared_page_state.SharedDesktopPageState) shared_page_state_class=shared_page_state.SharedDesktopPageState)
self.credentials = credentials
def RunPageInteractions(self, action_runner): def RunPageInteractions(self, action_runner):
pass pass
...@@ -34,8 +32,7 @@ class Gmail(SimplePage): ...@@ -34,8 +32,7 @@ class Gmail(SimplePage):
def __init__(self, page_set): def __init__(self, page_set):
super(Gmail, self).__init__( super(Gmail, self).__init__(
url='https://mail.google.com/mail/', url='https://mail.google.com/mail/',
page_set=page_set, page_set=page_set)
credentials='google')
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
super(Gmail, self).RunNavigateSteps(action_runner) super(Gmail, self).RunNavigateSteps(action_runner)
...@@ -48,8 +45,7 @@ class GoogleCalendar(SimplePage): ...@@ -48,8 +45,7 @@ class GoogleCalendar(SimplePage):
def __init__(self, page_set): def __init__(self, page_set):
super(GoogleCalendar, self).__init__( super(GoogleCalendar, self).__init__(
url='https://www.google.com/calendar/', url='https://www.google.com/calendar/',
page_set=page_set, page_set=page_set)
credentials='google')
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
super(GoogleCalendar, self).RunNavigateSteps(action_runner) super(GoogleCalendar, self).RunNavigateSteps(action_runner)
...@@ -67,8 +63,7 @@ class Youtube(SimplePage): ...@@ -67,8 +63,7 @@ class Youtube(SimplePage):
def __init__(self, page_set): def __init__(self, page_set):
super(Youtube, self).__init__( super(Youtube, self).__init__(
url='http://www.youtube.com', url='http://www.youtube.com',
page_set=page_set, page_set=page_set)
credentials='google')
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
super(Youtube, self).RunNavigateSteps(action_runner) super(Youtube, self).RunNavigateSteps(action_runner)
...@@ -80,7 +75,6 @@ class Facebook(SimplePage): ...@@ -80,7 +75,6 @@ class Facebook(SimplePage):
super(Facebook, self).__init__( super(Facebook, self).__init__(
url='https://www.facebook.com/barackobama', url='https://www.facebook.com/barackobama',
page_set=page_set, page_set=page_set,
credentials='facebook2',
name='Facebook') name='Facebook')
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
......
...@@ -24,14 +24,12 @@ def _CreatePageClassWithSmoothInteractions(page_cls): ...@@ -24,14 +24,12 @@ def _CreatePageClassWithSmoothInteractions(page_cls):
class TopSmoothPage(page_module.Page): class TopSmoothPage(page_module.Page):
def __init__(self, url, page_set, name='', credentials=None): def __init__(self, url, page_set, name=''):
if name == '': if name == '':
name = url name = url
super(TopSmoothPage, self).__init__( super(TopSmoothPage, self).__init__(
url=url, page_set=page_set, name=name, url=url, page_set=page_set, name=name,
shared_page_state_class=shared_page_state.SharedDesktopPageState, shared_page_state_class=shared_page_state.SharedDesktopPageState)
credentials_path='data/credentials.json')
self.credentials = credentials
def RunPageInteractions(self, action_runner): def RunPageInteractions(self, action_runner):
action_runner.Wait(1) action_runner.Wait(1)
......
...@@ -10,14 +10,12 @@ from page_sets.login_helpers import google_login ...@@ -10,14 +10,12 @@ from page_sets.login_helpers import google_login
class TopPages(page_module.Page): class TopPages(page_module.Page):
def __init__(self, url, page_set, shared_page_state_class, def __init__(self, url, page_set, shared_page_state_class,
name='', credentials=None): name=''):
if name == '': if name == '':
name = url name = url
super(TopPages, self).__init__( super(TopPages, self).__init__(
url=url, page_set=page_set, name=name, url=url, page_set=page_set, name=name,
credentials_path='data/credentials.json',
shared_page_state_class=shared_page_state_class) shared_page_state_class=shared_page_state_class)
self.credentials = credentials
class GoogleWebSearchPage(TopPages): class GoogleWebSearchPage(TopPages):
...@@ -48,8 +46,7 @@ class GoogleImageSearchPage(TopPages): ...@@ -48,8 +46,7 @@ class GoogleImageSearchPage(TopPages):
shared_page_state_class=shared_page_state_class) shared_page_state_class=shared_page_state_class)
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
google_login.LoginGoogleAccount(action_runner, 'googletest', google_login.LoginGoogleAccount(action_runner, 'googletest')
self.credentials_path)
super(GoogleImageSearchPage, self).RunNavigateSteps(action_runner) super(GoogleImageSearchPage, self).RunNavigateSteps(action_runner)
...@@ -65,8 +62,7 @@ class GmailPage(TopPages): ...@@ -65,8 +62,7 @@ class GmailPage(TopPages):
shared_page_state_class=shared_page_state_class) shared_page_state_class=shared_page_state_class)
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
google_login.LoginGoogleAccount(action_runner, 'googletest', google_login.LoginGoogleAccount(action_runner, 'googletest')
self.credentials_path)
super(GmailPage, self).RunNavigateSteps(action_runner) super(GmailPage, self).RunNavigateSteps(action_runner)
action_runner.WaitForJavaScriptCondition( action_runner.WaitForJavaScriptCondition(
'window.gmonkey !== undefined &&' 'window.gmonkey !== undefined &&'
...@@ -85,8 +81,7 @@ class GoogleCalendarPage(TopPages): ...@@ -85,8 +81,7 @@ class GoogleCalendarPage(TopPages):
shared_page_state_class=shared_page_state_class) shared_page_state_class=shared_page_state_class)
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
google_login.LoginGoogleAccount(action_runner, 'googletest', google_login.LoginGoogleAccount(action_runner, 'googletest')
self.credentials_path)
super(GoogleCalendarPage, self).RunNavigateSteps(action_runner) super(GoogleCalendarPage, self).RunNavigateSteps(action_runner)
action_runner.Wait(2) action_runner.Wait(2)
action_runner.WaitForElement('div[class~="navForward"]') action_runner.WaitForElement('div[class~="navForward"]')
...@@ -114,8 +109,7 @@ class GoogleDocPage(TopPages): ...@@ -114,8 +109,7 @@ class GoogleDocPage(TopPages):
shared_page_state_class=shared_page_state_class) shared_page_state_class=shared_page_state_class)
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
google_login.LoginGoogleAccount(action_runner, 'googletest', google_login.LoginGoogleAccount(action_runner, 'googletest')
self.credentials_path)
super(GoogleDocPage, self).RunNavigateSteps(action_runner) super(GoogleDocPage, self).RunNavigateSteps(action_runner)
action_runner.Wait(2) action_runner.Wait(2)
action_runner.WaitForJavaScriptCondition( action_runner.WaitForJavaScriptCondition(
...@@ -134,8 +128,7 @@ class GooglePlusPage(TopPages): ...@@ -134,8 +128,7 @@ class GooglePlusPage(TopPages):
shared_page_state_class=shared_page_state_class) shared_page_state_class=shared_page_state_class)
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
google_login.LoginGoogleAccount(action_runner, 'googletest', google_login.LoginGoogleAccount(action_runner, 'googletest')
self.credentials_path)
super(GooglePlusPage, self).RunNavigateSteps(action_runner) super(GooglePlusPage, self).RunNavigateSteps(action_runner)
action_runner.WaitForElement(text='Home') action_runner.WaitForElement(text='Home')
...@@ -152,8 +145,7 @@ class YoutubePage(TopPages): ...@@ -152,8 +145,7 @@ class YoutubePage(TopPages):
shared_page_state_class=shared_page_state_class) shared_page_state_class=shared_page_state_class)
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
google_login.LoginGoogleAccount(action_runner, 'googletest', google_login.LoginGoogleAccount(action_runner, 'googletest')
self.credentials_path)
super(YoutubePage, self).RunNavigateSteps(action_runner) super(YoutubePage, self).RunNavigateSteps(action_runner)
action_runner.Wait(2) action_runner.Wait(2)
......
...@@ -10,7 +10,7 @@ class ToughCompositorPage(page_module.Page): ...@@ -10,7 +10,7 @@ class ToughCompositorPage(page_module.Page):
def __init__(self, url, page_set): def __init__(self, url, page_set):
super(ToughCompositorPage, self).__init__( super(ToughCompositorPage, self).__init__(
url=url, page_set=page_set, credentials_path = 'data/credentials.json', url=url, page_set=page_set,
shared_page_state_class=shared_page_state.SharedMobilePageState, shared_page_state_class=shared_page_state.SharedMobilePageState,
name=url) name=url)
......
...@@ -13,8 +13,7 @@ class ToughPinchZoomCasesPage(page_module.Page): ...@@ -13,8 +13,7 @@ class ToughPinchZoomCasesPage(page_module.Page):
name = url name = url
super(ToughPinchZoomCasesPage, self).__init__( super(ToughPinchZoomCasesPage, self).__init__(
url=url, page_set=page_set, name=name, url=url, page_set=page_set, name=name,
shared_page_state_class=shared_page_state.SharedDesktopPageState, shared_page_state_class=shared_page_state.SharedDesktopPageState)
credentials_path = 'data/credentials.json')
self.target_scale_factor = page_set.target_scale_factor self.target_scale_factor = page_set.target_scale_factor
def RunPinchGesture(self, action_runner, left_anchor_ratio=0.5, def RunPinchGesture(self, action_runner, left_anchor_ratio=0.5,
...@@ -60,8 +59,6 @@ class GmailPage(ToughPinchZoomCasesPage): ...@@ -60,8 +59,6 @@ class GmailPage(ToughPinchZoomCasesPage):
url='https://mail.google.com/mail/', url='https://mail.google.com/mail/',
page_set=page_set) page_set=page_set)
self.credentials = 'google'
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
super(GmailPage, self).RunNavigateSteps(action_runner) super(GmailPage, self).RunNavigateSteps(action_runner)
action_runner.WaitForJavaScriptCondition( action_runner.WaitForJavaScriptCondition(
...@@ -78,8 +75,6 @@ class GoogleCalendarPage(ToughPinchZoomCasesPage): ...@@ -78,8 +75,6 @@ class GoogleCalendarPage(ToughPinchZoomCasesPage):
url='https://www.google.com/calendar/', url='https://www.google.com/calendar/',
page_set=page_set) page_set=page_set)
self.credentials = 'google'
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
super(GoogleCalendarPage, self).RunNavigateSteps(action_runner) super(GoogleCalendarPage, self).RunNavigateSteps(action_runner)
action_runner.Wait(2) action_runner.Wait(2)
...@@ -93,8 +88,6 @@ class GoogleImageSearchPage(ToughPinchZoomCasesPage): ...@@ -93,8 +88,6 @@ class GoogleImageSearchPage(ToughPinchZoomCasesPage):
url='https://www.google.com/search?q=cats&tbm=isch', url='https://www.google.com/search?q=cats&tbm=isch',
page_set=page_set) page_set=page_set)
self.credentials = 'google'
class YoutubePage(ToughPinchZoomCasesPage): class YoutubePage(ToughPinchZoomCasesPage):
...@@ -105,8 +98,6 @@ class YoutubePage(ToughPinchZoomCasesPage): ...@@ -105,8 +98,6 @@ class YoutubePage(ToughPinchZoomCasesPage):
url='http://www.youtube.com', url='http://www.youtube.com',
page_set=page_set) page_set=page_set)
self.credentials = 'google'
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
super(YoutubePage, self).RunNavigateSteps(action_runner) super(YoutubePage, self).RunNavigateSteps(action_runner)
action_runner.Wait(2) action_runner.Wait(2)
...@@ -136,7 +127,6 @@ class FacebookPage(ToughPinchZoomCasesPage): ...@@ -136,7 +127,6 @@ class FacebookPage(ToughPinchZoomCasesPage):
super(FacebookPage, self).__init__( super(FacebookPage, self).__init__(
url='http://www.facebook.com/barackobama', url='http://www.facebook.com/barackobama',
page_set=page_set, name='Facebook') page_set=page_set, name='Facebook')
self.credentials = 'facebook'
def RunNavigateSteps(self, action_runner): def RunNavigateSteps(self, action_runner):
super(FacebookPage, self).RunNavigateSteps(action_runner) super(FacebookPage, self).RunNavigateSteps(action_runner)
......
...@@ -10,7 +10,7 @@ class ToughSchedulingCasesPage(page_module.Page): ...@@ -10,7 +10,7 @@ class ToughSchedulingCasesPage(page_module.Page):
def __init__(self, url, page_set): def __init__(self, url, page_set):
super(ToughSchedulingCasesPage, self).__init__( super(ToughSchedulingCasesPage, self).__init__(
url=url, page_set=page_set, credentials_path='data/credentials.json', url=url, page_set=page_set,
shared_page_state_class=shared_page_state.SharedMobilePageState, shared_page_state_class=shared_page_state.SharedMobilePageState,
name=url.split('/')[-1]) name=url.split('/')[-1])
......
...@@ -11,7 +11,6 @@ class Typical10MobilePage(page_module.Page): ...@@ -11,7 +11,6 @@ class Typical10MobilePage(page_module.Page):
def __init__(self, url, page_set, name=''): def __init__(self, url, page_set, name=''):
super(Typical10MobilePage, self).__init__( super(Typical10MobilePage, self).__init__(
url=url, page_set=page_set, name=name, url=url, page_set=page_set, name=name,
credentials_path = 'data/credentials.json',
shared_page_state_class=shared_page_state.SharedMobilePageState) shared_page_state_class=shared_page_state.SharedMobilePageState)
def RunPageInteractions(self, action_runner): def RunPageInteractions(self, action_runner):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment