OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/variations/service/ui_string_overrider.h" | 5 #include "components/variations/service/ui_string_overrider.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 #include <stdint.h> |
| 9 |
| 10 #include "base/macros.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
8 | 12 |
9 namespace chrome_variations { | 13 namespace chrome_variations { |
10 | 14 |
11 namespace { | 15 namespace { |
12 | 16 |
13 const size_t kNumResources = 4; | 17 const size_t kNumResources = 4; |
14 | 18 |
15 const uint32_t kResourceHashes[] = { | 19 const uint32_t kResourceHashes[] = { |
16 301430091U, // IDS_BOOKMARKS_NO_ITEMS | 20 301430091U, // IDS_BOOKMARKS_NO_ITEMS |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // 3847176171U is 1 + the hash for IDS_BOOKMARK_GROUP_FROM_FIREFOX. | 55 // 3847176171U is 1 + the hash for IDS_BOOKMARK_GROUP_FROM_FIREFOX. |
52 EXPECT_EQ(-1, GetResourceIndex(3847176171U)); | 56 EXPECT_EQ(-1, GetResourceIndex(3847176171U)); |
53 } | 57 } |
54 | 58 |
55 TEST_F(UIStringOverriderTest, LookupFound) { | 59 TEST_F(UIStringOverriderTest, LookupFound) { |
56 for (size_t i = 0; i < kNumResources; ++i) | 60 for (size_t i = 0; i < kNumResources; ++i) |
57 EXPECT_EQ(kResourceIndices[i], GetResourceIndex(kResourceHashes[i])); | 61 EXPECT_EQ(kResourceIndices[i], GetResourceIndex(kResourceHashes[i])); |
58 } | 62 } |
59 | 63 |
60 } // namespace chrome_variations | 64 } // namespace chrome_variations |
OLD | NEW |