ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / tools / perf / page_sets / page_reload_cases.py
blob25eeb24a616958d57f87e9bf498c5cb2629e70d6
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.
4 from telemetry.page import page as page_module
5 from telemetry.page import page_set as page_set_module
7 from page_sets import top_pages
10 def _Reload(action_runner):
11 # Numbers below are chosen arbitrarily. For the V8DetachedContextAgeInGC
12 # the number of reloads should be high enough so that V8 could do few
13 # incremeantal GCs.
14 NUMBER_OF_RELOADS = 7
15 WAIT_TIME = 2
16 for _ in xrange(NUMBER_OF_RELOADS):
17 action_runner.ReloadPage()
18 action_runner.Wait(WAIT_TIME)
21 def _CreatePageClassWithReload(page_cls):
22 class DerivedSmoothPage(page_cls): # pylint: disable=W0232
24 def RunPageInteractions(self, action_runner):
25 _Reload(action_runner)
26 return DerivedSmoothPage
29 class PageReloadCasesPageSet(page_set_module.PageSet):
31 """ Pages for testing GC efficiency on page reload. """
33 def __init__(self):
34 super(PageReloadCasesPageSet, self).__init__(
35 user_agent_type='desktop',
36 archive_data_file='data/top_25.json',
37 bucket=page_set_module.PARTNER_BUCKET)
39 self.AddUserStory(_CreatePageClassWithReload(
40 top_pages.GoogleWebSearchPage)(self))
41 self.AddUserStory(_CreatePageClassWithReload(
42 top_pages.GmailPage)(self))
43 self.AddUserStory(_CreatePageClassWithReload(
44 top_pages.GoogleCalendarPage)(self))
45 self.AddUserStory(_CreatePageClassWithReload(
46 top_pages.GoogleDocPage)(self))
47 self.AddUserStory(_CreatePageClassWithReload(
48 top_pages.GooglePlusPage)(self))
49 self.AddUserStory(_CreatePageClassWithReload(
50 top_pages.YoutubePage)(self))
51 self.AddUserStory(_CreatePageClassWithReload(
52 top_pages.WordpressPage)(self))
53 self.AddUserStory(_CreatePageClassWithReload(
54 top_pages.FacebookPage)(self))