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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grit/format/policy_templates/writers/xml_writer_base_unittest.py
===================================================================
--- grit/format/policy_templates/writers/xml_writer_base_unittest.py (revision 0)
+++ grit/format/policy_templates/writers/xml_writer_base_unittest.py (revision 0)
@@ -0,0 +1,38 @@
+#!/usr/bin/python2.4
+# Copyright (c) 2011 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.
+
+
+"""Unittests for grit.format.policy_templates.writers.admx_writer."""
+
+
+import os
+import sys
+import unittest
+
+
+from xml.dom import minidom
+
+
+class XmlWriterBaseTest(unittest.TestCase):
+ '''Base class for XML writer unit-tests.
+ '''
+
+ def GetXMLOfChildren(self, parent):
+ '''Returns the XML of all child nodes of the given parent node.
+ Args:
+ parent: The XML of the children of this node will be returned.
+
+ Return: XML of the chrildren of the parent node.
+ '''
+ return ''.join(
+ child.toprettyxml(indent=' ') for child in parent.childNodes)
+
+ def AssertXMLEquals(self, output, expected_output):
+ '''Asserts if the passed XML arguements are equal.
+ Args:
+ output: Actual XML text.
+ expected_output: Expected XML text.
+ '''
+ self.assertEquals(output.strip(), expected_output.strip())
Property changes on: grit/format/policy_templates/writers/xml_writer_base_unittest.py
___________________________________________________________________
Added: svn:eol-style
+ LF
« 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