OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/resources_util.h" | 5 #include "chrome/browser/resources_util.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 9 #include "base/macros.h" |
| 10 #include "build/build_config.h" |
7 #include "grit/theme_resources.h" | 11 #include "grit/theme_resources.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "ui/resources/grit/ui_resources.h" | 13 #include "ui/resources/grit/ui_resources.h" |
10 | 14 |
11 #if defined(OS_CHROMEOS) | 15 #if defined(OS_CHROMEOS) |
12 #include "grit/ui_chromeos_resources.h" | 16 #include "grit/ui_chromeos_resources.h" |
13 #endif | 17 #endif |
14 | 18 |
15 TEST(ResourcesUtil, SpotCheckIds) { | 19 TEST(ResourcesUtil, SpotCheckIds) { |
16 const struct { | 20 const struct { |
(...skipping 10 matching lines...) Expand all Loading... |
27 {"IDR_LOGIN_DEFAULT_USER", IDR_LOGIN_DEFAULT_USER}, | 31 {"IDR_LOGIN_DEFAULT_USER", IDR_LOGIN_DEFAULT_USER}, |
28 #endif | 32 #endif |
29 // Unknown names should be invalid and return -1. | 33 // Unknown names should be invalid and return -1. |
30 {"foobar", -1}, | 34 {"foobar", -1}, |
31 {"backstar", -1}, | 35 {"backstar", -1}, |
32 }; | 36 }; |
33 | 37 |
34 for (size_t i = 0; i < arraysize(kCases); ++i) | 38 for (size_t i = 0; i < arraysize(kCases); ++i) |
35 EXPECT_EQ(kCases[i].id, ResourcesUtil::GetThemeResourceId(kCases[i].name)); | 39 EXPECT_EQ(kCases[i].id, ResourcesUtil::GetThemeResourceId(kCases[i].name)); |
36 } | 40 } |
OLD | NEW |