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

Side by Side Diff: tools/metrics/ukm/pretty_print_test.py

Issue 2769223005: Create a UKM descriptions XML file (Closed)
Patch Set: Incorporate feedback Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2017 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import unittest
7
8 import model
9
10
11 PRETTY_XML = """
12 <!-- Comment1 -->
13
14 <ukm-configuration>
15
16 <event name="Event1">
17 <owner>owner@chromium.org</owner>
18 <summary>
19 Event1 summary.
20 </summary>
21 <metric name="Metric1">
22 <owner>owner2@chromium.org</owner>
23 <summary>
24 Metric1 summary.
25 </summary>
26 </metric>
27 <metric name="Metric2"/>
28 </event>
29
30 </ukm-configuration>
31 """.strip()
32
33
34 class UkmXmlTest(unittest.TestCase):
35
36 def testIsPretty(self):
37 result = model.UpdateXML(PRETTY_XML)
38 self.assertMultiLineEqual(PRETTY_XML, result.strip())
39
40
41 if __name__ == '__main__':
42 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698