1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/resources_util.h"
7 #include "grit/theme_resources.h"
8 #include "grit/theme_resources_standard.h"
9 #include "testing/gtest/include/gtest/gtest.h"
20 TEST(ResourcesUtil
, SpotCheckIds
) {
21 const TestCase kTestCases
[] = {
22 {"IDR_BACK", IDR_BACK
},
23 {"IDR_STOP", IDR_STOP
},
24 {"IDR_OMNIBOX_STAR", IDR_OMNIBOX_STAR
},
25 {"IDR_SAD_TAB", IDR_SAD_TAB
},
27 for (size_t i
= 0; i
< arraysize(kTestCases
); ++i
) {
28 EXPECT_EQ(kTestCases
[i
].id
,
29 ResourcesUtil::GetThemeResourceId(kTestCases
[i
].name
));
32 // Should return -1 of unknown names.
33 EXPECT_EQ(-1, ResourcesUtil::GetThemeResourceId("foobar"));
34 EXPECT_EQ(-1, ResourcesUtil::GetThemeResourceId("backstar"));