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.
5 from telemetry
.page
import page
as page_module
6 from telemetry
.page
import page_set
as page_set_module
7 from telemetry
.page
import shared_page_state
9 from page_sets
import webgl_supported_shared_state
12 class ToughWebglCasesPage(page_module
.Page
):
14 def __init__(self
, url
, page_set
):
15 super(ToughWebglCasesPage
, self
).__init
__(
16 url
=url
, page_set
=page_set
,
17 shared_page_state_class
=(
18 webgl_supported_shared_state
.WebGLSupportedSharedState
))
19 self
.archive_data_file
= 'data/tough_webgl_cases.json'
22 def RunNavigateSteps(self
, action_runner
):
23 super(ToughWebglCasesPage
, self
).RunNavigateSteps(action_runner
)
24 action_runner
.WaitForJavaScriptCondition(
25 'document.readyState == "complete"')
28 def RunPageInteractions(self
, action_runner
):
32 class ToughWebglCasesPageSet(page_set_module
.PageSet
):
35 Description: Self-driven WebGL animation examples
39 super(ToughWebglCasesPageSet
, self
).__init
__(
40 archive_data_file
='data/tough_webgl_cases.json',
41 bucket
=page_set_module
.PUBLIC_BUCKET
)
44 # pylint: disable=C0301
45 'http://www.khronos.org/registry/webgl/sdk/demos/google/nvidia-vertex-buffer-object/index.html',
46 # pylint: disable=C0301
47 'http://www.khronos.org/registry/webgl/sdk/demos/google/san-angeles/index.html',
48 # pylint: disable=C0301
49 'http://www.khronos.org/registry/webgl/sdk/demos/google/particles/index.html',
50 'http://www.khronos.org/registry/webgl/sdk/demos/webkit/Earth.html',
51 # pylint: disable=C0301
52 'http://www.khronos.org/registry/webgl/sdk/demos/webkit/ManyPlanetsDeep.html',
53 'http://webglsamples.googlecode.com/hg/aquarium/aquarium.html',
54 'http://webglsamples.googlecode.com/hg/blob/blob.html',
55 # pylint: disable=C0301
56 'http://webglsamples.googlecode.com/hg/dynamic-cubemap/dynamic-cubemap.html'
59 self
.AddUserStory(ToughWebglCasesPage(url
, self
))