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

Side by Side Diff: grit/format/policy_templates/writers/xml_writer_base_unittest.py

Issue 7994004: Initial source commit to grit-i18n project. (Closed) Base URL: http://grit-i18n.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « grit/format/policy_templates/writers/xml_formatted_writer.py ('k') | grit/format/rc.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 #!/usr/bin/python2.4
2 # Copyright (c) 2011 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
7 """Unittests for grit.format.policy_templates.writers.admx_writer."""
8
9
10 import os
11 import sys
12 import unittest
13
14
15 from xml.dom import minidom
16
17
18 class XmlWriterBaseTest(unittest.TestCase):
19 '''Base class for XML writer unit-tests.
20 '''
21
22 def GetXMLOfChildren(self, parent):
23 '''Returns the XML of all child nodes of the given parent node.
24 Args:
25 parent: The XML of the children of this node will be returned.
26
27 Return: XML of the chrildren of the parent node.
28 '''
29 return ''.join(
30 child.toprettyxml(indent=' ') for child in parent.childNodes)
31
32 def AssertXMLEquals(self, output, expected_output):
33 '''Asserts if the passed XML arguements are equal.
34 Args:
35 output: Actual XML text.
36 expected_output: Expected XML text.
37 '''
38 self.assertEquals(output.strip(), expected_output.strip())
OLDNEW
« no previous file with comments | « grit/format/policy_templates/writers/xml_formatted_writer.py ('k') | grit/format/rc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698