Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: tools/perf/page_sets/system_health/story_tags.py

Issue 2651623005: [tools/perf] Create a list of tags for system_health_story (Closed)
Patch Set: Address review comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/perf/page_sets/system_health/system_health_story.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/system_health/story_tags.py
diff --git a/tools/perf/page_sets/system_health/story_tags.py b/tools/perf/page_sets/system_health/story_tags.py
new file mode 100644
index 0000000000000000000000000000000000000000..a88957f9f8ea2939ad55881cc3b6820b9b47dc13
--- /dev/null
+++ b/tools/perf/page_sets/system_health/story_tags.py
@@ -0,0 +1,55 @@
+# Copyright 2017 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.
+
+import collections
+
+
+Tag = collections.namedtuple('Tag', ['name', 'description'])
+
+
+# Below are tags that describe various aspect of system health stories.
+# A story can have multiple tags. All the tags should be noun.
+
+AUDIO_PLAYBACK = Tag(
+ 'audio-playback', 'Story has audio playing.')
+CANVAS_ANIMATION = Tag(
+ 'canvas-animation', 'Story has animations that are implemented using '
+ 'html5 canvas.')
+CSS_ANIMATION = Tag(
+ 'css-animation', 'Story has animations that are implemented using CSS.')
+EXTENSION = Tag(
+ 'extension', 'Story has browser with extension installed.')
+IMAGES = Tag(
+ 'images', 'Story has sites with heavy uses of images.')
+INTERNATIONAL = Tag(
+ 'international', 'Story has navigations to websites with content in non '
+ 'English languages.')
+SCROLL = Tag(
+ 'scroll', 'Story has scroll gestures & scroll animation.')
+PINCH_ZOOM = Tag(
+ 'pinch-zoom', 'Story has pinch zoom gestures & pinch zoom animation.')
+TABS_SWITCHING = Tag(
+ 'tabs-switching', 'Story has multi tabs and tabs switching action.')
+VIDEO_PLAYBACK = Tag(
+ 'video-playback', 'Story has video playing.')
+WEBGL = Tag(
+ 'webgl', 'Story has sites with heavy uses of WebGL.')
+WEB_STORAGE = Tag(
+ 'web-storage', 'Story has sites with heavy uses of Web storage.')
+
+
+def _ExtractAllTags():
+ all_tag_names = set()
+ all_tags = []
+ # Collect all the tags defined in this module. Also assert that there is no
+ # duplicate tag names.
+ for obj in globals().values():
+ if isinstance(obj, Tag):
+ all_tags.append(obj)
+ assert obj.name not in all_tag_names, 'Duplicate tag name: %s' % obj.name
+ all_tag_names.add(obj.name)
+ return all_tags
+
+
+ALL_TAGS = _ExtractAllTags()
« no previous file with comments | « no previous file | tools/perf/page_sets/system_health/system_health_story.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698