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():
class GooglePages(page_module.Page):
def __init__(self, url, page_set, shared_page_state_class,
name='', credentials=None):
name=''):
super(GooglePages, self).__init__(
url=url, page_set=page_set, name=name,
credentials_path='data/credentials.json',
shared_page_state_class=shared_page_state_class)
self.credentials = credentials
self.script_to_evaluate_on_commit = _DeterministicPerformanceCounters()
......@@ -35,8 +33,7 @@ class GmailPage(GooglePages):
name='https://mail.google.com/mail/')
def RunNavigateSteps(self, action_runner):
google_login.LoginGoogleAccount(action_runner, 'google',
self.credentials_path)
google_login.LoginGoogleAccount(action_runner, 'google')
super(GmailPage, self).RunNavigateSteps(action_runner)
action_runner.WaitForJavaScriptCondition(
'window.gmonkey !== undefined &&'
......
......@@ -10,14 +10,12 @@ from page_sets.login_helpers import google_login
class KeyDesktopMoveCasesPage(page_module.Page):
def __init__(self, url, page_set, name='', credentials=None):
def __init__(self, url, page_set, name=''):
if name == '':
name = url
super(KeyDesktopMoveCasesPage, self).__init__(
url=url, page_set=page_set, name=name,
credentials_path='data/credentials.json',
shared_page_state_class=shared_page_state.SharedDesktopPageState)
self.credentials = credentials
class GmailMouseScrollPage(KeyDesktopMoveCasesPage):
......@@ -37,8 +35,7 @@ class GmailMouseScrollPage(KeyDesktopMoveCasesPage):
}'''
def RunNavigateSteps(self, action_runner):
google_login.LoginGoogleAccount(action_runner, 'googletest',
self.credentials_path)
google_login.LoginGoogleAccount(action_runner, 'googletest')
super(GmailMouseScrollPage, self).RunNavigateSteps(action_runner)
action_runner.WaitForJavaScriptCondition(
'window.gmonkey !== undefined &&'
......
......@@ -13,7 +13,7 @@ class KeyMobileSitesPage(page_module.Page):
super(KeyMobileSitesPage, self).__init__(
url=url, page_set=page_set, name=name,
shared_page_state_class=shared_page_state.SharedMobilePageState,
credentials_path='data/credentials.json', tags=tags)
tags=tags)
class CapitolVolkswagenPage(KeyMobileSitesPage):
......
......@@ -28,8 +28,7 @@ class KeyMobileSitesSmoothPage(page_module.Page):
if name == '':
name = url
super(KeyMobileSitesSmoothPage, self).__init__(
url=url, page_set=page_set, name=name,
credentials_path='data/credentials.json', tags=tags,
url=url, page_set=page_set, name=name, tags=tags,
shared_page_state_class=shared_page_state.SharedMobilePageState)
self.action_on_load_complete = action_on_load_complete
......
......@@ -19,7 +19,7 @@ class KeySilkCasesPage(page_module.Page):
if not name.startswith('http'):
name = url.split('/')[-1]
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,
name=name)
self._run_no_page_interactions = run_no_page_interactions
......@@ -467,8 +467,6 @@ class Page22(KeySilkCasesPage):
url='http://plus.google.com/app/basic/stream',
page_set=page_set, run_no_page_interactions=run_no_page_interactions)
self.credentials = 'google'
def RunNavigateSteps(self, action_runner):
super(Page22, self).RunNavigateSteps(action_runner)
action_runner.WaitForJavaScriptCondition(
......
......@@ -10,7 +10,7 @@ class PathologicalMobileSitesPage(page_module.Page):
def __init__(self, url, page_set):
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,
name=url)
......
......@@ -13,7 +13,6 @@ class SimplePage(page_module.Page):
url=url,
page_set=page_set,
shared_page_state_class=shared_page_state.Shared10InchTabletPageState,
credentials_path='data/credentials.json',
name=url)
def RunNavigateSteps(self, action_runner):
......
......@@ -7,14 +7,12 @@ from telemetry import story
class SimplePage(page_module.Page):
def __init__(self, url, page_set, credentials='', name=''):
def __init__(self, url, page_set, name=''):
if name == '':
name = url
super(SimplePage, self).__init__(
url, page_set=page_set, name=name,
credentials_path='data/credentials.json',
shared_page_state_class=shared_page_state.SharedDesktopPageState)
self.credentials = credentials
def RunPageInteractions(self, action_runner):
pass
......@@ -34,8 +32,7 @@ class Gmail(SimplePage):
def __init__(self, page_set):
super(Gmail, self).__init__(
url='https://mail.google.com/mail/',
page_set=page_set,
credentials='google')
page_set=page_set)
def RunNavigateSteps(self, action_runner):
super(Gmail, self).RunNavigateSteps(action_runner)
......@@ -48,8 +45,7 @@ class GoogleCalendar(SimplePage):
def __init__(self, page_set):
super(GoogleCalendar, self).__init__(
url='https://www.google.com/calendar/',
page_set=page_set,
credentials='google')
page_set=page_set)
def RunNavigateSteps(self, action_runner):
super(GoogleCalendar, self).RunNavigateSteps(action_runner)
......@@ -67,8 +63,7 @@ class Youtube(SimplePage):
def __init__(self, page_set):
super(Youtube, self).__init__(
url='http://www.youtube.com',
page_set=page_set,
credentials='google')
page_set=page_set)
def RunNavigateSteps(self, action_runner):
super(Youtube, self).RunNavigateSteps(action_runner)
......@@ -80,7 +75,6 @@ class Facebook(SimplePage):
super(Facebook, self).__init__(
url='https://www.facebook.com/barackobama',
page_set=page_set,
credentials='facebook2',
name='Facebook')
def RunNavigateSteps(self, action_runner):
......
......@@ -24,14 +24,12 @@ def _CreatePageClassWithSmoothInteractions(page_cls):
class TopSmoothPage(page_module.Page):
def __init__(self, url, page_set, name='', credentials=None):
def __init__(self, url, page_set, name=''):
if name == '':
name = url
super(TopSmoothPage, self).__init__(
url=url, page_set=page_set, name=name,
shared_page_state_class=shared_page_state.SharedDesktopPageState,
credentials_path='data/credentials.json')
self.credentials = credentials
shared_page_state_class=shared_page_state.SharedDesktopPageState)
def RunPageInteractions(self, action_runner):
action_runner.Wait(1)
......
......@@ -10,14 +10,12 @@ from page_sets.login_helpers import google_login
class TopPages(page_module.Page):
def __init__(self, url, page_set, shared_page_state_class,
name='', credentials=None):
name=''):
if name == '':
name = url
super(TopPages, self).__init__(
url=url, page_set=page_set, name=name,
credentials_path='data/credentials.json',
shared_page_state_class=shared_page_state_class)
self.credentials = credentials
class GoogleWebSearchPage(TopPages):
......@@ -48,8 +46,7 @@ class GoogleImageSearchPage(TopPages):
shared_page_state_class=shared_page_state_class)
def RunNavigateSteps(self, action_runner):
google_login.LoginGoogleAccount(action_runner, 'googletest',
self.credentials_path)
google_login.LoginGoogleAccount(action_runner, 'googletest')
super(GoogleImageSearchPage, self).RunNavigateSteps(action_runner)
......@@ -65,8 +62,7 @@ class GmailPage(TopPages):
shared_page_state_class=shared_page_state_class)
def RunNavigateSteps(self, action_runner):
google_login.LoginGoogleAccount(action_runner, 'googletest',
self.credentials_path)
google_login.LoginGoogleAccount(action_runner, 'googletest')
super(GmailPage, self).RunNavigateSteps(action_runner)
action_runner.WaitForJavaScriptCondition(
'window.gmonkey !== undefined &&'
......@@ -85,8 +81,7 @@ class GoogleCalendarPage(TopPages):
shared_page_state_class=shared_page_state_class)
def RunNavigateSteps(self, action_runner):
google_login.LoginGoogleAccount(action_runner, 'googletest',
self.credentials_path)
google_login.LoginGoogleAccount(action_runner, 'googletest')
super(GoogleCalendarPage, self).RunNavigateSteps(action_runner)
action_runner.Wait(2)
action_runner.WaitForElement('div[class~="navForward"]')
......@@ -114,8 +109,7 @@ class GoogleDocPage(TopPages):
shared_page_state_class=shared_page_state_class)
def RunNavigateSteps(self, action_runner):
google_login.LoginGoogleAccount(action_runner, 'googletest',
self.credentials_path)
google_login.LoginGoogleAccount(action_runner, 'googletest')
super(GoogleDocPage, self).RunNavigateSteps(action_runner)
action_runner.Wait(2)
action_runner.WaitForJavaScriptCondition(
......@@ -134,8 +128,7 @@ class GooglePlusPage(TopPages):
shared_page_state_class=shared_page_state_class)
def RunNavigateSteps(self, action_runner):
google_login.LoginGoogleAccount(action_runner, 'googletest',
self.credentials_path)
google_login.LoginGoogleAccount(action_runner, 'googletest')
super(GooglePlusPage, self).RunNavigateSteps(action_runner)
action_runner.WaitForElement(text='Home')
......@@ -152,8 +145,7 @@ class YoutubePage(TopPages):
shared_page_state_class=shared_page_state_class)
def RunNavigateSteps(self, action_runner):
google_login.LoginGoogleAccount(action_runner, 'googletest',
self.credentials_path)
google_login.LoginGoogleAccount(action_runner, 'googletest')
super(YoutubePage, self).RunNavigateSteps(action_runner)
action_runner.Wait(2)
......
......@@ -10,7 +10,7 @@ class ToughCompositorPage(page_module.Page):
def __init__(self, url, page_set):
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,
name=url)
......
......@@ -13,8 +13,7 @@ class ToughPinchZoomCasesPage(page_module.Page):
name = url
super(ToughPinchZoomCasesPage, self).__init__(
url=url, page_set=page_set, name=name,
shared_page_state_class=shared_page_state.SharedDesktopPageState,
credentials_path = 'data/credentials.json')
shared_page_state_class=shared_page_state.SharedDesktopPageState)
self.target_scale_factor = page_set.target_scale_factor
def RunPinchGesture(self, action_runner, left_anchor_ratio=0.5,
......@@ -60,8 +59,6 @@ class GmailPage(ToughPinchZoomCasesPage):
url='https://mail.google.com/mail/',
page_set=page_set)
self.credentials = 'google'
def RunNavigateSteps(self, action_runner):
super(GmailPage, self).RunNavigateSteps(action_runner)
action_runner.WaitForJavaScriptCondition(
......@@ -78,8 +75,6 @@ class GoogleCalendarPage(ToughPinchZoomCasesPage):
url='https://www.google.com/calendar/',
page_set=page_set)
self.credentials = 'google'
def RunNavigateSteps(self, action_runner):
super(GoogleCalendarPage, self).RunNavigateSteps(action_runner)
action_runner.Wait(2)
......@@ -93,8 +88,6 @@ class GoogleImageSearchPage(ToughPinchZoomCasesPage):
url='https://www.google.com/search?q=cats&tbm=isch',
page_set=page_set)
self.credentials = 'google'
class YoutubePage(ToughPinchZoomCasesPage):
......@@ -105,8 +98,6 @@ class YoutubePage(ToughPinchZoomCasesPage):
url='http://www.youtube.com',
page_set=page_set)
self.credentials = 'google'
def RunNavigateSteps(self, action_runner):
super(YoutubePage, self).RunNavigateSteps(action_runner)
action_runner.Wait(2)
......@@ -136,7 +127,6 @@ class FacebookPage(ToughPinchZoomCasesPage):
super(FacebookPage, self).__init__(
url='http://www.facebook.com/barackobama',
page_set=page_set, name='Facebook')
self.credentials = 'facebook'
def RunNavigateSteps(self, action_runner):
super(FacebookPage, self).RunNavigateSteps(action_runner)
......
......@@ -10,7 +10,7 @@ class ToughSchedulingCasesPage(page_module.Page):
def __init__(self, url, page_set):
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,
name=url.split('/')[-1])
......
......@@ -11,7 +11,6 @@ class Typical10MobilePage(page_module.Page):
def __init__(self, url, page_set, name=''):
super(Typical10MobilePage, self).__init__(
url=url, page_set=page_set, name=name,
credentials_path = 'data/credentials.json',
shared_page_state_class=shared_page_state.SharedMobilePageState)
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