Index: tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py |
diff --git a/tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py b/tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py |
index 6a5fd42026699edab5c24d1ed0ac84b1523bc0b1..9aafd118ae3b8386b565c14baa4ef82beeb91fe5 100644 |
--- a/tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py |
+++ b/tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py |
@@ -1,4 +1,4 @@ |
-# Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+# 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. |
@@ -315,6 +315,20 @@ See <a href="http://policy-explanation.example.com">http://policy-explanation.ex |
self.doc_root.toxml(), |
'<root>"awesome-example"</root>') |
+ def testIntExample(self): |
+ # Test representation of 'int' example values. |
+ policy = { |
+ 'name': 'PolicyName', |
+ 'type': 'int', |
+ 'annotations': { |
+ 'example_value': 26 |
+ } |
+ } |
+ self.writer._AddExample(self.doc_root, policy) |
+ self.assertEquals( |
+ self.doc_root.toxml(), |
+ '<root>0x0000001a (Windows), 26 (Linux/Mac)</root>') |
+ |
def testAddPolicyAttribute(self): |
# Test creating a policy attribute term-definition pair. |
self.writer._AddPolicyAttribute( |