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

Unified Diff: grit/format/policy_templates/writers/doc_writer_unittest.py

Issue 631223003: Include chromium version number in policy templates (Closed) Base URL: http://grit-i18n.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 2 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
Index: grit/format/policy_templates/writers/doc_writer_unittest.py
===================================================================
--- grit/format/policy_templates/writers/doc_writer_unittest.py (revision 177)
+++ grit/format/policy_templates/writers/doc_writer_unittest.py (working copy)
@@ -39,6 +39,7 @@
'os_name': 'Chrome OS',
'win_reg_mandatory_key_name': 'MockKey',
'win_reg_recommended_key_name': 'MockKeyRec',
+ 'build': 'test_product',
})
self.writer.messages = {
'doc_back_to_top': {'text': '_test_back_to_top'},
@@ -103,6 +104,31 @@
'<div/>'
'</div>')
+ def testVersionAnnotation(self):
+ # Test if DocWriter creates the skeleton of the document correctly.
+ self.writer.config['version'] = '39.0.0.0'
+ self.writer.BeginTemplate()
+ self.assertEquals(
+ self.writer._main_div.toxml(),
+ '<div>'
+ '<!--test_product version: 39.0.0.0-->'
+ '<div>'
+ '<a name="top"/><br/>_test_intro<br/><br/><br/>'
+ '<table style="style_table;">'
+ '<thead><tr style="style_tr;">'
+ '<td style="style_td;style_td.left;style_thead td;">'
+ '_test_name_column_title'
+ '</td>'
+ '<td style="style_td;style_td.right;style_thead td;">'
+ '_test_description_column_title'
+ '</td>'
+ '</tr></thead>'
+ '<tbody/>'
+ '</table>'
+ '</div>'
+ '<div/>'
+ '</div>')
+
def testGetLocalizedMessage(self):
# Test if localized messages are retrieved correctly.
self.writer.messages = {
« no previous file with comments | « grit/format/policy_templates/writers/doc_writer.py ('k') | grit/format/policy_templates/writers/ios_plist_writer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698