forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtough_webgl_cases.py
60 lines (47 loc) · 2.21 KB
/
tough_webgl_cases.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
from page_sets import webgl_supported_shared_state
class ToughWebglCasesPage(page_module.Page):
def __init__(self, url, page_set):
super(ToughWebglCasesPage, self).__init__(
url=url, page_set=page_set,
shared_page_state_class=(
webgl_supported_shared_state.WebGLSupportedSharedState),
make_javascript_deterministic=False)
self.archive_data_file = 'data/tough_webgl_cases.json'
def RunNavigateSteps(self, action_runner):
super(ToughWebglCasesPage, self).RunNavigateSteps(action_runner)
action_runner.WaitForJavaScriptCondition(
'document.readyState == "complete"')
action_runner.Wait(2)
def RunPageInteractions(self, action_runner):
with action_runner.CreateInteraction('WebGLAnimation'):
action_runner.Wait(5)
class ToughWebglCasesPageSet(page_set_module.PageSet):
"""
Description: Self-driven WebGL animation examples
"""
def __init__(self):
super(ToughWebglCasesPageSet, self).__init__(
archive_data_file='data/tough_webgl_cases.json',
bucket=page_set_module.PUBLIC_BUCKET)
urls_list = [
# pylint: disable=C0301
'http://www.khronos.org/registry/webgl/sdk/demos/google/nvidia-vertex-buffer-object/index.html',
# pylint: disable=C0301
'http://www.khronos.org/registry/webgl/sdk/demos/google/san-angeles/index.html',
# pylint: disable=C0301
'http://www.khronos.org/registry/webgl/sdk/demos/google/particles/index.html',
'http://www.khronos.org/registry/webgl/sdk/demos/webkit/Earth.html',
# pylint: disable=C0301
'http://www.khronos.org/registry/webgl/sdk/demos/webkit/ManyPlanetsDeep.html',
'http://webglsamples.googlecode.com/hg/aquarium/aquarium.html',
'http://webglsamples.googlecode.com/hg/blob/blob.html',
# pylint: disable=C0301
'http://webglsamples.googlecode.com/hg/dynamic-cubemap/dynamic-cubemap.html'
]
for url in urls_list:
self.AddUserStory(ToughWebglCasesPage(url, self))