OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 """Unittests for generate_resources_map.py""" | 6 """Unittests for generate_resources_map.py""" |
7 | 7 |
8 import unittest | 8 import unittest |
9 | 9 |
10 import generate_resources_map | 10 import generate_resources_map |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 def testGenerateFileContent(self): | 61 def testGenerateFileContent(self): |
62 expected = ( | 62 expected = ( |
63 """// This file was generated by generate_resources_map.py. Do not edit. | 63 """// This file was generated by generate_resources_map.py. Do not edit. |
64 | 64 |
65 | 65 |
66 #include "chrome/browser/metrics/variations/generated_resources_map.h" | 66 #include "chrome/browser/metrics/variations/generated_resources_map.h" |
67 | 67 |
68 namespace chrome_variations { | 68 namespace chrome_variations { |
69 | 69 |
| 70 const size_t kNumResources = 4; |
| 71 |
70 const uint32_t kResourceHashes[] = { | 72 const uint32_t kResourceHashes[] = { |
71 301430091U, // IDS_BOOKMARKS_NO_ITEMS | 73 301430091U, // IDS_BOOKMARKS_NO_ITEMS |
72 2654138887U, // IDS_BOOKMARK_BAR_IMPORT_LINK | 74 2654138887U, // IDS_BOOKMARK_BAR_IMPORT_LINK |
73 2894469061U, // IDS_BOOKMARK_GROUP_FROM_IE | 75 2894469061U, // IDS_BOOKMARK_GROUP_FROM_IE |
74 3847176170U, // IDS_BOOKMARK_GROUP_FROM_FIREFOX | 76 3847176170U, // IDS_BOOKMARK_GROUP_FROM_FIREFOX |
75 }; | 77 }; |
76 | 78 |
77 const int kResourceIndices[] = { | 79 const int kResourceIndices[] = { |
78 12500, // IDS_BOOKMARKS_NO_ITEMS | 80 12500, // IDS_BOOKMARKS_NO_ITEMS |
79 12501, // IDS_BOOKMARK_BAR_IMPORT_LINK | 81 12501, // IDS_BOOKMARK_BAR_IMPORT_LINK |
80 12502, // IDS_BOOKMARK_GROUP_FROM_IE | 82 12502, // IDS_BOOKMARK_GROUP_FROM_IE |
81 12503, // IDS_BOOKMARK_GROUP_FROM_FIREFOX | 83 12503, // IDS_BOOKMARK_GROUP_FROM_FIREFOX |
82 }; | 84 }; |
83 | 85 |
84 } // namespace chrome_variations | 86 } // namespace chrome_variations |
85 """) | 87 """) |
86 actual = generate_resources_map._GenerateFileContent(self.TEST_INPUT) | 88 actual = generate_resources_map._GenerateFileContent(self.TEST_INPUT) |
87 | 89 |
88 self.assertEqual(expected, actual) | 90 self.assertEqual(expected, actual) |
89 | 91 |
90 if __name__ == '__main__': | 92 if __name__ == '__main__': |
91 unittest.main() | 93 unittest.main() |
OLD | NEW |