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

Unified Diff: tools/metrics/rappor/pretty_print_test.py

Issue 1058333002: Multi-dimension rappor metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup and add xml support Created 5 years, 8 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 | « tools/metrics/rappor/pretty_print.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/metrics/rappor/pretty_print_test.py
diff --git a/tools/metrics/rappor/pretty_print_test.py b/tools/metrics/rappor/pretty_print_test.py
index 428158a9ccf9c883ca6cc75784f8dcdfc1faaeb9..72d9236f34581b75e2c081bc159bb1e1423d265a 100755
--- a/tools/metrics/rappor/pretty_print_test.py
+++ b/tools/metrics/rappor/pretty_print_test.py
@@ -28,10 +28,21 @@ PRETTY_XML = """
</rappor-parameter-types>
+<flag-sets>
+<!-- Comment 3.5 -->
+
+<flag-set name="TEST_FLAGS">
+ <flag name="FLAG1" description="The first flag."/>
+ <flag name="FLAG2" description="The second flag."/>
+</flag-set>
+
+</flag-sets>
+
<rappor-metrics>
<!-- Comment4 -->
-<rappor-metric name="Test.Rappor.Metric" type="TEST_RAPPOR_TYPE">
+<rappor-metric name="Test.Rappor.Metric" type="TEST_RAPPOR_TYPE"
+ flags="TEST_FLAGS">
<owner>user1@chromium.org</owner>
<owner>user2@chromium.org</owner>
<summary>
@@ -42,12 +53,13 @@ PRETTY_XML = """
</rappor-metrics>
</rappor-configuration>
-""".strip()
+""".lstrip()
BASIC_METRIC = {
'comments': [],
'name': 'Test.Rappor.Metric',
'type': 'TEST_RAPPOR_TYPE',
+ 'flags': 'TEST_FLAGS',
'owners': ['user1@chromium.org', 'user2@chromium.org'],
'summary': 'A fake metric summary.',
}
@@ -57,7 +69,7 @@ class ActionXmlTest(unittest.TestCase):
def testIsPretty(self):
result = pretty_print.UpdateXML(PRETTY_XML)
- self.assertEqual(PRETTY_XML, result)
+ self.assertEqual(PRETTY_XML.split('\n'), result.split('\n'))
def testParsing(self):
comments, config = pretty_print.RAPPOR_XML_TYPE.Parse(PRETTY_XML)
« no previous file with comments | « tools/metrics/rappor/pretty_print.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698