OLD | NEW |
| (Empty) |
1 # Copyright (c) 2012 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 os | |
5 | |
6 from telemetry.test import discover | |
7 from telemetry.page import page_action | |
8 | |
9 _page_action_classes = discover.Discover( | |
10 os.path.dirname(__file__), | |
11 os.path.join(os.path.dirname(__file__), '..', '..'), | |
12 'action', | |
13 page_action.PageAction, | |
14 import_error_should_raise=True) | |
15 | |
16 def GetAllClasses(): | |
17 return list(_page_action_classes.values()) | |
18 | |
19 def FindClassWithName(name): | |
20 return _page_action_classes.get(name) | |
21 | |
22 def RegisterClassForTest(name, clazz): | |
23 _page_action_classes[name] = clazz | |
OLD | NEW |