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

Unified Diff: tools/perf/page_sets/top_7_stress.py

Issue 793983003: Rewrite broken Facebook test case in top_7_stress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add top_7_stress.json instead of changing top_25.json Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/page_sets/data/top_7_stress_002.wpr.sha1 ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/top_7_stress.py
diff --git a/tools/perf/page_sets/top_7_stress.py b/tools/perf/page_sets/top_7_stress.py
index 32ad29f62d71a623b892ddfec198e411d2265530..88a8cf187061db42f3dde08dac3ded132f5d6d09 100644
--- a/tools/perf/page_sets/top_7_stress.py
+++ b/tools/perf/page_sets/top_7_stress.py
@@ -21,7 +21,7 @@ class Top7StressPage(page_module.Page):
url=url, page_set=page_set, name=name,
credentials_path = 'data/credentials.json')
self.user_agent_type = 'desktop'
- self.archive_data_file = 'data/top_25.json'
+ self.archive_data_file = 'data/top_7_stress.json'
def RunPageInteractions(self, action_runner):
raise NotImplementedError()
@@ -309,19 +309,23 @@ class FacebookPage(Top7StressPage):
action_runner.WaitForElement(text='About')
def RunPageInteractions(self, action_runner):
- action_runner.ClickElement(text='About')
- action_runner.WaitForNavigate()
- action_runner.ClickElement(text='The Audacity of Hope')
- action_runner.WaitForNavigate()
- action_runner.ClickElement(text='Back to Barack Obama\'s Timeline')
- action_runner.WaitForNavigate()
- action_runner.ClickElement(text='About')
- action_runner.WaitForNavigate()
- action_runner.ClickElement(text='Elected to U.S. Senate')
- action_runner.WaitForNavigate()
- action_runner.ClickElement(text='Home')
- action_runner.WaitForNavigate()
+ # Scroll and wait for the next page to be loaded.
+ interaction = action_runner.BeginGestureInteraction(
+ 'ScrollAction', is_smooth=True)
+ action_runner.ScrollPage()
+ interaction.End()
+ action_runner.WaitForJavaScriptCondition(
+ 'document.documentElement.scrollHeight - window.innerHeight - '
+ 'window.pageYOffset > 0')
+ # Scroll and wait again.
+ interaction = action_runner.BeginGestureInteraction(
+ 'ScrollAction', is_smooth=True)
+ action_runner.ScrollPage()
+ interaction.End()
+ action_runner.WaitForJavaScriptCondition(
+ 'document.documentElement.scrollHeight - window.innerHeight - '
+ 'window.pageYOffset > 0')
class Top7StressPageSet(page_set_module.PageSet):
@@ -330,7 +334,7 @@ class Top7StressPageSet(page_set_module.PageSet):
def __init__(self):
super(Top7StressPageSet, self).__init__(
user_agent_type='desktop',
- archive_data_file='data/top_25.json',
+ archive_data_file='data/top_7_stress.json',
bucket=page_set_module.PARTNER_BUCKET)
self.AddUserStory(GoogleWebSearchPage(self))
« no previous file with comments | « tools/perf/page_sets/data/top_7_stress_002.wpr.sha1 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698