Commit fb343175 authored by miletus's avatar miletus Committed by Commit bot

key_mobile_sites_smooth: Reload pages before scrolling for LinkedIn and Wowwiki

We have shader compilation caching but telemetry can't benefit from it since
pages are tested with cache cleared.

We want to reflect the caching impact in our metrics. To enable the cache,
after the initial load of the page, we wait for a while for the page to
build some cache, and then reload the page and test the user interaction.

Linkedin and Wowwiki in key_mobile_sites_smooth are selected for this since
they are found to have expensive initial shader compilation cost.

BUG=430631,453861,451216

Review URL: https://codereview.chromium.org/959063002

Cr-Commit-Position: refs/heads/master@{#319102}
parent ab544bfc
...@@ -40,6 +40,36 @@ class KeyMobileSitesSmoothPage(page_module.Page): ...@@ -40,6 +40,36 @@ class KeyMobileSitesSmoothPage(page_module.Page):
_IssueMarkerAndScroll(action_runner) _IssueMarkerAndScroll(action_runner)
class LinkedInSmoothPage(key_mobile_sites_pages.LinkedInPage):
def __init__(self, page_set):
super(LinkedInSmoothPage, self).__init__(page_set=page_set)
# Linkedin has expensive shader compilation so it can benefit from shader
# cache from reload.
def RunNavigateSteps(self, action_runner):
super(LinkedInSmoothPage, self).RunNavigateSteps(action_runner)
action_runner.ScrollPage()
action_runner.ReloadPage()
super(LinkedInSmoothPage, self).RunNavigateSteps(action_runner)
class WowwikiSmoothPage(KeyMobileSitesSmoothPage):
"""Why: Mobile wiki."""
def __init__(self, page_set):
super(WowwikiSmoothPage, self).__init__(
url='http://www.wowwiki.com/World_of_Warcraft:_Mists_of_Pandaria',
page_set=page_set)
# Wowwiki has expensive shader compilation so it can benefit from shader
# cache from reload.
def RunNavigateSteps(self, action_runner):
super(WowwikiSmoothPage, self).RunNavigateSteps(action_runner)
action_runner.ScrollPage()
action_runner.ReloadPage()
super(WowwikiSmoothPage, self).RunNavigateSteps(action_runner)
class GmailSmoothPage(key_mobile_sites_pages.GmailPage): class GmailSmoothPage(key_mobile_sites_pages.GmailPage):
def RunPageInteractions(self, action_runner): def RunPageInteractions(self, action_runner):
...@@ -129,7 +159,6 @@ class KeyMobileSitesSmoothPageSet(page_set_module.PageSet): ...@@ -129,7 +159,6 @@ class KeyMobileSitesSmoothPageSet(page_set_module.PageSet):
key_mobile_sites_pages.CnnArticlePage, key_mobile_sites_pages.CnnArticlePage,
key_mobile_sites_pages.FacebookPage, key_mobile_sites_pages.FacebookPage,
key_mobile_sites_pages.YoutubeMobilePage, key_mobile_sites_pages.YoutubeMobilePage,
key_mobile_sites_pages.LinkedInPage,
key_mobile_sites_pages.YahooAnswersPage, key_mobile_sites_pages.YahooAnswersPage,
key_mobile_sites_pages.GoogleNewsMobilePage, key_mobile_sites_pages.GoogleNewsMobilePage,
] ]
...@@ -137,6 +166,10 @@ class KeyMobileSitesSmoothPageSet(page_set_module.PageSet): ...@@ -137,6 +166,10 @@ class KeyMobileSitesSmoothPageSet(page_set_module.PageSet):
self.AddUserStory( self.AddUserStory(
_CreatePageClassWithSmoothInteractions(page_class)(self)) _CreatePageClassWithSmoothInteractions(page_class)(self))
self.AddUserStory(
_CreatePageClassWithSmoothInteractions(LinkedInSmoothPage)(self))
self.AddUserStory(WowwikiSmoothPage(self))
# Add pages with custom page interaction logic. # Add pages with custom page interaction logic.
# Page behaves non-deterministically, replaced with test version for now. # Page behaves non-deterministically, replaced with test version for now.
...@@ -253,8 +286,6 @@ class KeyMobileSitesSmoothPageSet(page_set_module.PageSet): ...@@ -253,8 +286,6 @@ class KeyMobileSitesSmoothPageSet(page_set_module.PageSet):
'http://www.sfgate.com/', 'http://www.sfgate.com/',
# Why: Non-latin character set # Why: Non-latin character set
'http://worldjournal.com/', 'http://worldjournal.com/',
# Why: Mobile wiki
'http://www.wowwiki.com/World_of_Warcraft:_Mists_of_Pandaria',
# Why: #15 Alexa news # Why: #15 Alexa news
'http://online.wsj.com/home-page', 'http://online.wsj.com/home-page',
# Why: Image-heavy mobile site # Why: Image-heavy mobile site
......
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