[Android WebViewShell] Add inclusion test for webview exposed stable interfaces.
[chromium-blink-merge.git] / tools / perf / page_sets / long_running_idle_google_cases.py
blob3f8ca9508773299d180bb8c22af5c0cc087cd5af
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
3 # found in the LICENSE file.
5 from telemetry import story
7 from page_sets import google_pages
9 IDLE_TIME_IN_SECONDS = 100
11 def _CreateIdlePageClass(base_page_cls):
12 class DerivedIdlePage(base_page_cls): # pylint: disable=W0232
13 def RunPageInteractions(self, action_runner):
14 action_runner.Wait(IDLE_TIME_IN_SECONDS)
15 return DerivedIdlePage
18 def _CreateIdleBackgroundPageClass(base_page_cls):
19 class DerivedIdlePage(base_page_cls): # pylint: disable=W0232
20 def RunPageInteractions(self, action_runner):
21 action_runner.tab.browser.tabs.New()
22 action_runner.Wait(IDLE_TIME_IN_SECONDS)
23 return DerivedIdlePage
26 class LongRunningIdleGmailPageSet(story.StorySet):
27 def __init__(self):
28 super(LongRunningIdleGmailPageSet, self).__init__(
29 archive_data_file='data/long_running_idle_gmail_page.json',
30 cloud_storage_bucket=story.PARTNER_BUCKET)
31 self.AddStory(
32 _CreateIdlePageClass(google_pages.GmailPage)(self))
35 class LongRunningIdleGmailBackgroundPageSet(story.StorySet):
36 def __init__(self):
37 # Reuse the wpr of foreground gmail.
38 super(LongRunningIdleGmailBackgroundPageSet, self).__init__(
39 archive_data_file='data/long_running_idle_gmail_page.json',
40 cloud_storage_bucket=story.PARTNER_BUCKET)
41 self.AddStory(
42 _CreateIdleBackgroundPageClass(google_pages.GmailPage)(self))