OLD | NEW |
1 # Copyright 2017 The Chromium Authors. All rights reserved. | 1 # Copyright 2017 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import collections | 5 import collections |
6 | 6 |
7 | 7 |
8 Tag = collections.namedtuple('Tag', ['name', 'description']) | 8 Tag = collections.namedtuple('Tag', ['name', 'description']) |
9 | 9 |
10 | 10 |
11 # Below are tags that describe various aspect of system health stories. | 11 # Below are tags that describe various aspect of system health stories. |
12 # A story can have multiple tags. All the tags should be noun. | 12 # A story can have multiple tags. All the tags should be noun. |
13 | 13 |
14 AUDIO_PLAYBACK = Tag( | 14 AUDIO_PLAYBACK = Tag( |
15 'audio_playback', 'Story has audio playing.') | 15 'audio_playback', 'Story has audio playing.') |
16 CANVAS_ANIMATION = Tag( | 16 CANVAS_ANIMATION = Tag( |
17 'canvas_animation', 'Story has animations that are implemented using ' | 17 'canvas_animation', 'Story has animations that are implemented using ' |
18 'html5 canvas.') | 18 'html5 canvas.') |
19 CSS_ANIMATION = Tag( | 19 CSS_ANIMATION = Tag( |
20 'css_animation', 'Story has animations that are implemented using CSS.') | 20 'css_animation', 'Story has animations that are implemented using CSS.') |
21 EXTENSION = Tag( | 21 EXTENSION = Tag( |
22 'extension', 'Story has browser with extension installed.') | 22 'extension', 'Story has browser with extension installed.') |
23 IMAGES = Tag( | 23 IMAGES = Tag( |
24 'images', 'Story has sites with heavy uses of images.') | 24 'images', 'Story has sites with heavy uses of images.') |
| 25 INFINITE_SCROLL = Tag('infinite_scroll', 'Story has infinite scroll action.') |
25 INTERNATIONAL = Tag( | 26 INTERNATIONAL = Tag( |
26 'international', 'Story has navigations to websites with content in non ' | 27 'international', 'Story has navigations to websites with content in non ' |
27 'English languages.') | 28 'English languages.') |
28 EMERGING_MARKET = Tag( | 29 EMERGING_MARKET = Tag( |
29 'emerging_market', 'Story has significant usage in emerging markets with ' | 30 'emerging_market', 'Story has significant usage in emerging markets with ' |
30 'low-end mobile devices and slow network connections.') | 31 'low-end mobile devices and slow network connections.') |
31 JAVASCRIPT_HEAVY = Tag( | 32 JAVASCRIPT_HEAVY = Tag( |
32 'javascript_heavy', 'Story has navigations to websites with heavy usages ' | 33 'javascript_heavy', 'Story has navigations to websites with heavy usages ' |
33 'of JavaScript. The story uses 20Mb+ memory for javascript and local ' | 34 'of JavaScript. The story uses 20Mb+ memory for javascript and local ' |
34 'run with "v8" category enabled also shows the trace has js slices across ' | 35 'run with "v8" category enabled also shows the trace has js slices across ' |
(...skipping 19 matching lines...) Expand all Loading... |
54 # duplicate tag names. | 55 # duplicate tag names. |
55 for obj in globals().values(): | 56 for obj in globals().values(): |
56 if isinstance(obj, Tag): | 57 if isinstance(obj, Tag): |
57 all_tags.append(obj) | 58 all_tags.append(obj) |
58 assert obj.name not in all_tag_names, 'Duplicate tag name: %s' % obj.name | 59 assert obj.name not in all_tag_names, 'Duplicate tag name: %s' % obj.name |
59 all_tag_names.add(obj.name) | 60 all_tag_names.add(obj.name) |
60 return all_tags | 61 return all_tags |
61 | 62 |
62 | 63 |
63 ALL_TAGS = _ExtractAllTags() | 64 ALL_TAGS = _ExtractAllTags() |
OLD | NEW |