Home | History | Annotate | Download | only in page_sets
      1 # Copyright 2014 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 # pylint: disable=W0401,W0614
      5 from telemetry.page.actions.all_page_actions import *
      6 from telemetry.page import page as page_module
      7 from telemetry.page import page_set as page_set_module
      8 
      9 
     10 class MseCasesPage(page_module.Page):
     11 
     12   def __init__(self, url, page_set):
     13     super(MseCasesPage, self).__init__(url=url, page_set=page_set)
     14 
     15   def RunNavigateSteps(self, action_runner):
     16     action_runner.NavigateToPage(self)
     17     action_runner.WaitForJavaScriptCondition('window.__testDone == true')
     18 
     19 
     20 class MseCasesPageSet(page_set_module.PageSet):
     21 
     22   """ Media source extensions perf benchmark """
     23 
     24   def __init__(self):
     25     super(MseCasesPageSet, self).__init__()
     26 
     27     urls_list = [
     28       'file://mse_cases/startup_test.html?testType=AV',
     29       'file://mse_cases/startup_test.html?testType=AV&useAppendStream=true',
     30       # pylint: disable=C0301
     31       'file://mse_cases/startup_test.html?testType=AV&doNotWaitForBodyOnLoad=true',
     32       # pylint: disable=C0301
     33       'file://mse_cases/startup_test.html?testType=AV&useAppendStream=true&doNotWaitForBodyOnLoad=true',
     34       'file://mse_cases/startup_test.html?testType=V',
     35       'file://mse_cases/startup_test.html?testType=V&useAppendStream=true',
     36       # pylint: disable=C0301
     37       'file://mse_cases/startup_test.html?testType=V&doNotWaitForBodyOnLoad=true',
     38       # pylint: disable=C0301
     39       'file://mse_cases/startup_test.html?testType=V&useAppendStream=true&doNotWaitForBodyOnLoad=true',
     40       'file://mse_cases/startup_test.html?testType=A',
     41       'file://mse_cases/startup_test.html?testType=A&useAppendStream=true',
     42       # pylint: disable=C0301
     43       'file://mse_cases/startup_test.html?testType=A&doNotWaitForBodyOnLoad=true',
     44       # pylint: disable=C0301
     45       'file://mse_cases/startup_test.html?testType=A&useAppendStream=true&doNotWaitForBodyOnLoad=true',
     46     ]
     47 
     48     for url in urls_list:
     49       self.AddPage(MseCasesPage(url, self))
     50