diff options
author | markusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-20 16:10:20 +0000 |
---|---|---|
committer | markusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-20 16:10:20 +0000 |
commit | 58281523b4190ecd681107d68a86b2ddecef201e (patch) | |
tree | 9b0dfa1d420eedcac219813a07baca999b494b37 /tools/grit | |
parent | 8ae9021ea35fecf818cdc042b914ea98da7ff8b1 (diff) | |
download | chromium_src-58281523b4190ecd681107d68a86b2ddecef201e.zip chromium_src-58281523b4190ecd681107d68a86b2ddecef201e.tar.gz chromium_src-58281523b4190ecd681107d68a86b2ddecef201e.tar.bz2 |
Don't add "lable" elements to "decimalTextBox" elements in ADML but only the plain lable text.
BUG=97047
TEST=adml_writer_unittests.py
Review URL: http://codereview.chromium.org/7935014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101965 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/grit')
-rw-r--r-- | tools/grit/grit/format/policy_templates/writers/adml_writer.py | 3 | ||||
-rw-r--r-- | tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/tools/grit/grit/format/policy_templates/writers/adml_writer.py b/tools/grit/grit/format/policy_templates/writers/adml_writer.py index d2f476f..46e299d 100644 --- a/tools/grit/grit/format/policy_templates/writers/adml_writer.py +++ b/tools/grit/grit/format/policy_templates/writers/adml_writer.py @@ -90,8 +90,7 @@ class ADMLWriter(xml_formatted_writer.XMLFormattedWriter): elif policy_type == 'int': textbox_elem = self.AddElement(presentation_elem, 'decimalTextBox', {'refId': policy_name}) - label_elem = self.AddElement(textbox_elem, 'label') - label_elem.appendChild(self._doc.createTextNode(policy_label)) + textbox_elem.appendChild(self._doc.createTextNode(policy_label + ':')) elif policy_type in ('int-enum', 'string-enum'): for item in policy['items']: self._AddString(self._string_table_elem, item['name'], item['caption']) diff --git a/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py b/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py index 9231f68..41e9e8d 100644 --- a/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py +++ b/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py @@ -184,9 +184,7 @@ class AdmlWriterTest(xml_writer_base_unittest.XmlWriterBaseTest): expected_output = ( '<presentation id="IntPolicyStub">\n' ' <decimalTextBox refId="IntPolicyStub">\n' - ' <label>\n' - ' Int policy label\n' - ' </label>\n' + ' Int policy label:\n' ' </decimalTextBox>\n' '</presentation>') self.AssertXMLEquals(output, expected_output) |