Remove the dependency of PasswordStore on BrowserContextKeyedService
[chromium-blink-merge.git] / chrome / browser / resources_util_unittest.cc
blob763755943e3f15f21314fd032e451aabc53ac035
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
3 // found in the LICENSE file.
5 #include "chrome/browser/resources_util.h"
7 #include "grit/theme_resources.h"
8 #include "grit/ui_resources.h"
9 #include "testing/gtest/include/gtest/gtest.h"
11 TEST(ResourcesUtil, SpotCheckIds) {
12 const struct {
13 const char* name;
14 int id;
15 } kCases[] = {
16 // IDRs from chrome/app/theme/theme_resources.grd should be valid.
17 {"IDR_BACK", IDR_BACK},
18 {"IDR_STOP", IDR_STOP},
19 // IDRs from ui/resources/ui_resources.grd should be valid.
20 {"IDR_CHECKMARK", IDR_CHECKMARK},
21 {"IDR_THROBBER", IDR_THROBBER},
22 // Unknown names should be invalid and return -1.
23 {"foobar", -1},
24 {"backstar", -1},
27 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kCases); ++i)
28 EXPECT_EQ(kCases[i].id, ResourcesUtil::GetThemeResourceId(kCases[i].name));