Home | History | Annotate | Download | only in benchmarks
      1 # Copyright (c) 2013 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 import sys
      5 
      6 from telemetry import test
      7 
      8 from measurements import page_cycler
      9 
     10 
     11 class PageCyclerBloat(test.Test):
     12   test = page_cycler.PageCycler
     13   page_set = 'page_sets/page_cycler/bloat.json'
     14   options = {'pageset_repeat_iters': 10}
     15 
     16 
     17 class PageCyclerDhtml(test.Test):
     18   test = page_cycler.PageCycler
     19   page_set = 'page_sets/page_cycler/dhtml.json'
     20   options = {'pageset_repeat_iters': 10}
     21 
     22 
     23 class PageCyclerIndexeddb(test.Test):
     24   tag = 'indexed_db'
     25   test = page_cycler.PageCycler
     26   page_set = 'page_sets/page_cycler/indexed_db/basic_insert.json'
     27   options = {'pageset_repeat_iters': 10}
     28 
     29 
     30 class PageCyclerIntlArFaHe(test.Test):
     31   test = page_cycler.PageCycler
     32   page_set = 'page_sets/intl_ar_fa_he.json'
     33   options = {'pageset_repeat_iters': 10}
     34 
     35 
     36 class PageCyclerIntlEsFrPtBr(test.Test):
     37   test = page_cycler.PageCycler
     38   page_set = 'page_sets/intl_es_fr_pt-BR.json'
     39   options = {'pageset_repeat_iters': 10}
     40 
     41 
     42 class PageCyclerIntlHiRu(test.Test):
     43   test = page_cycler.PageCycler
     44   page_set = 'page_sets/intl_hi_ru.json'
     45   options = {'pageset_repeat_iters': 10}
     46 
     47 
     48 class PageCyclerIntlJaZh(test.Test):
     49   test = page_cycler.PageCycler
     50   page_set = 'page_sets/intl_ja_zh.json'
     51   options = {'pageset_repeat_iters': 10}
     52 
     53 
     54 class PageCyclerIntlKoThVi(test.Test):
     55   test = page_cycler.PageCycler
     56   page_set = 'page_sets/intl_ko_th_vi.json'
     57   options = {'pageset_repeat_iters': 10}
     58 
     59 
     60 class PageCyclerMorejs(test.Test):
     61   test = page_cycler.PageCycler
     62   page_set = 'page_sets/page_cycler/morejs.json'
     63   options = {'pageset_repeat_iters': 10}
     64 
     65 
     66 class PageCyclerMoz(test.Test):
     67   test = page_cycler.PageCycler
     68   page_set = 'page_sets/page_cycler/moz.json'
     69   options = {'pageset_repeat_iters': 10}
     70 
     71 
     72 class PageCyclerNetsimTop10(test.Test):
     73   """Measures load time of the top 10 sites under simulated cable network."""
     74   tag = 'netsim'
     75   test = page_cycler.PageCycler
     76   page_set = 'page_sets/top_10.json'
     77   options = {
     78     'cold_load_percent': 100,
     79     'extra_wpr_args': [
     80       '--shaping_type=proxy',
     81       '--net=cable'
     82       ],
     83     'pageset_repeat_iters': 5,
     84     }
     85 
     86   def __init__(self):
     87     super(PageCyclerNetsimTop10, self).__init__()
     88     # TODO: This isn't quite right.
     89     # This option will still apply to page cyclers that run after this one.
     90     self.test.clear_cache_before_each_run = True
     91 
     92 
     93 class PageCyclerTop10Mobile(test.Test):
     94   enabled = False  # Fails on Android.
     95 
     96   test = page_cycler.PageCycler
     97   page_set = 'page_sets/top_10_mobile.json'
     98   options = {'pageset_repeat_iters': 10}
     99 
    100 
    101 class PageCyclerToughLayoutCases(test.Test):
    102   test = page_cycler.PageCycler
    103   page_set = 'page_sets/tough_layout_cases.json'
    104   options = {'pageset_repeat_iters': 10}
    105 
    106 
    107 class PageCyclerTypical25(test.Test):
    108   # crbug.com/273986: This test is really flakey on xp.
    109   enabled = not sys.platform.startswith('win')
    110   test = page_cycler.PageCycler
    111   page_set = 'page_sets/typical_25.json'
    112   options = {'pageset_repeat_iters': 10}
    113