| Index: grit/format/policy_templates/writers/doc_writer_unittest.py
|
| diff --git a/grit/format/policy_templates/writers/doc_writer_unittest.py b/grit/format/policy_templates/writers/doc_writer_unittest.py
|
| index 6c087d528e9d7fbc445ebcda0b85889b9ab58729..05ea240eb46e6d4207c78cbe883222278149c0a4 100644
|
| --- a/grit/format/policy_templates/writers/doc_writer_unittest.py
|
| +++ b/grit/format/policy_templates/writers/doc_writer_unittest.py
|
| @@ -282,7 +282,7 @@ See <a href="http://policy-explanation.example.com">http://policy-explanation.ex
|
| '<root>0x00000010 (Windows), 16 (Linux), 16 (Mac)</root>')
|
|
|
| def testStringEnumExample(self):
|
| - # Test representation of 'int-enum' example values.
|
| + # Test representation of 'string-enum' example values.
|
| policy = {
|
| 'name': 'PolicyName',
|
| 'type': 'string-enum',
|
| @@ -293,6 +293,40 @@ See <a href="http://policy-explanation.example.com">http://policy-explanation.ex
|
| self.doc_root.toxml(),
|
| '<root>"wacky"</root>')
|
|
|
| + def testListExample(self):
|
| + # Test representation of 'list' example values.
|
| + policy = {
|
| + 'name': 'PolicyName',
|
| + 'type': 'list',
|
| + 'example_value': ['one', 'two'],
|
| + 'supported_on': [ { 'platforms': ['linux'] } ]
|
| + }
|
| + self.writer._AddExample(self.doc_root, policy)
|
| + self.assertEquals(
|
| + self.doc_root.toxml(),
|
| + '<root><dl style="style_dd dl;">'
|
| + '<dt>Linux:</dt>'
|
| + '<dd style="style_.monospace;">'
|
| + '["one", "two"]'
|
| + '</dd></dl></root>')
|
| +
|
| + def testStringEnumListExample(self):
|
| + # Test representation of 'string-enum-list' example values.
|
| + policy = {
|
| + 'name': 'PolicyName',
|
| + 'type': 'string-enum-list',
|
| + 'example_value': ['one', 'two'],
|
| + 'supported_on': [ { 'platforms': ['linux'] } ]
|
| + }
|
| + self.writer._AddExample(self.doc_root, policy)
|
| + self.assertEquals(
|
| + self.doc_root.toxml(),
|
| + '<root><dl style="style_dd dl;">'
|
| + '<dt>Linux:</dt>'
|
| + '<dd style="style_.monospace;">'
|
| + '["one", "two"]'
|
| + '</dd></dl></root>')
|
| +
|
| def testStringExample(self):
|
| # Test representation of 'string' example values.
|
| policy = {
|
|
|