| 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)
|
|
|