Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 '''Unit tests for grit.format.resource_map''' | 6 '''Unit tests for grit.format.resource_map''' |
| 7 | 7 |
| 8 import os | 8 import os |
| 9 import sys | 9 import sys |
| 10 if __name__ == '__main__': | 10 if __name__ == '__main__': |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 <outputs> | 102 <outputs> |
| 103 <output type="rc_header" filename="the_rc_header.h" /> | 103 <output type="rc_header" filename="the_rc_header.h" /> |
| 104 <output type="resource_map_header" filename="the_rc_map_header.h" /> | 104 <output type="resource_map_header" filename="the_rc_map_header.h" /> |
| 105 <output type="resource_map_source" filename="the_rc_map_source.cc" /> | 105 <output type="resource_map_source" filename="the_rc_map_source.cc" /> |
| 106 </outputs> | 106 </outputs> |
| 107 <release seq="1" allow_pseudo="false"> | 107 <release seq="1" allow_pseudo="false"> |
| 108 <messages fallback_to_english="true"> | 108 <messages fallback_to_english="true"> |
| 109 <message name="IDS_PRODUCT_NAME" desc="The application name"> | 109 <message name="IDS_PRODUCT_NAME" desc="The application name"> |
| 110 Application | 110 Application |
| 111 </message> | 111 </message> |
| 112 <if expr="1"> | 112 <if expr="True"> |
|
newt (away)
2014/02/07 17:33:42
This test was failing since I added an assert that
| |
| 113 <message name="IDS_DEFAULT_TAB_TITLE_TITLE_CASE" | 113 <message name="IDS_DEFAULT_TAB_TITLE_TITLE_CASE" |
| 114 desc="In Title Case: The default title in a tab."> | 114 desc="In Title Case: The default title in a tab."> |
| 115 New Tab | 115 New Tab |
| 116 </message> | 116 </message> |
| 117 </if> | 117 </if> |
| 118 <if expr="0"> | 118 <if expr="False"> |
| 119 <message name="IDS_DEFAULT_TAB_TITLE" | 119 <message name="IDS_DEFAULT_TAB_TITLE" |
| 120 desc="The default title in a tab."> | 120 desc="The default title in a tab."> |
| 121 New tab | 121 New tab |
| 122 </message> | 122 </message> |
| 123 </if> | 123 </if> |
| 124 </messages> | 124 </messages> |
| 125 </release> | 125 </release> |
| 126 </grit>'''), util.PathFromRoot('.')) | 126 </grit>'''), util.PathFromRoot('.')) |
| 127 grd.SetOutputLanguage('en') | 127 grd.SetOutputLanguage('en') |
| 128 grd.RunGatherers() | 128 grd.RunGatherers() |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 147 #include "the_rc_header.h" | 147 #include "the_rc_header.h" |
| 148 const GritResourceMap kTheRcHeader[] = { | 148 const GritResourceMap kTheRcHeader[] = { |
| 149 {"IDS_PRODUCT_NAME", IDS_PRODUCT_NAME}, | 149 {"IDS_PRODUCT_NAME", IDS_PRODUCT_NAME}, |
| 150 {"IDS_DEFAULT_TAB_TITLE_TITLE_CASE", IDS_DEFAULT_TAB_TITLE_TITLE_CASE}, | 150 {"IDS_DEFAULT_TAB_TITLE_TITLE_CASE", IDS_DEFAULT_TAB_TITLE_TITLE_CASE}, |
| 151 }; | 151 }; |
| 152 const size_t kTheRcHeaderSize = arraysize(kTheRcHeader);''', output) | 152 const size_t kTheRcHeaderSize = arraysize(kTheRcHeader);''', output) |
| 153 | 153 |
| 154 | 154 |
| 155 if __name__ == '__main__': | 155 if __name__ == '__main__': |
| 156 unittest.main() | 156 unittest.main() |
| OLD | NEW |