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