Plumb scroll elasticity layer from Blink to cc
[chromium-blink-merge.git] / tools / perf / page_sets / tough_webgl_cases.py
blobc8a2682721a11a282afa96c4c2e24e2ba48e1806
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 import logging
6 from telemetry.page import page as page_module
7 from telemetry.page import page_set as page_set_module
10 class ToughWebglCasesPage(page_module.Page):
12 def __init__(self, url, page_set):
13 super(ToughWebglCasesPage, self).__init__(url=url, page_set=page_set)
14 self.archive_data_file = 'data/tough_webgl_cases.json'
16 def CanRunOnBrowser(self, browser_info):
17 if not browser_info.HasWebGLSupport():
18 logging.warning('Browser does not support webgl, skipping test')
19 return False
20 return True
22 def RunNavigateSteps(self, action_runner):
23 action_runner.NavigateToPage(self)
24 action_runner.WaitForJavaScriptCondition(
25 'document.readyState == "complete"')
26 action_runner.Wait(2)
28 def RunSmoothness(self, action_runner):
29 action_runner.Wait(5)
32 class ToughWebglCasesPageSet(page_set_module.PageSet):
34 """
35 Description: Self-driven WebGL animation examples
36 """
38 def __init__(self):
39 super(ToughWebglCasesPageSet, self).__init__(
40 archive_data_file='data/tough_webgl_cases.json')
42 urls_list = [
43 # pylint: disable=C0301
44 'http://www.khronos.org/registry/webgl/sdk/demos/google/nvidia-vertex-buffer-object/index.html',
45 # pylint: disable=C0301
46 'http://www.khronos.org/registry/webgl/sdk/demos/google/san-angeles/index.html',
47 # pylint: disable=C0301
48 'http://www.khronos.org/registry/webgl/sdk/demos/google/particles/index.html',
49 'http://www.khronos.org/registry/webgl/sdk/demos/webkit/Earth.html',
50 # pylint: disable=C0301
51 'http://www.khronos.org/registry/webgl/sdk/demos/webkit/ManyPlanetsDeep.html',
52 'http://webglsamples.googlecode.com/hg/aquarium/aquarium.html',
53 'http://webglsamples.googlecode.com/hg/blob/blob.html',
54 # pylint: disable=C0301
55 'http://webglsamples.googlecode.com/hg/dynamic-cubemap/dynamic-cubemap.html'
57 for url in urls_list:
58 self.AddPage(ToughWebglCasesPage(url, self))