1. Token CRCs are not handled correctly. This adds the corrected Whispernet binary...
[chromium-blink-merge.git] / chrome / browser / resources_util_unittest.cc
blob74a31f33cdc660c377dc40808d1d6031a244d1af
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 "testing/gtest/include/gtest/gtest.h"
9 #include "ui/resources/grit/ui_resources.h"
11 #if defined(OS_CHROMEOS)
12 #include "grit/ui_chromeos_resources.h"
13 #endif
15 TEST(ResourcesUtil, SpotCheckIds) {
16 const struct {
17 const char* name;
18 int id;
19 } kCases[] = {
20 // IDRs from chrome/app/theme/theme_resources.grd should be valid.
21 {"IDR_INFOBAR_COOKIE", IDR_INFOBAR_COOKIE},
22 {"IDR_PAGEINFO_BAD", IDR_PAGEINFO_BAD},
23 // IDRs from ui/resources/ui_resources.grd should be valid.
24 {"IDR_CHECKMARK", IDR_CHECKMARK},
25 {"IDR_THROBBER", IDR_THROBBER},
26 #if defined(OS_CHROMEOS)
27 // Check IDRs from ui/chromeos/resources/ui_chromeos_resources.grd.
28 {"IDR_LOGIN_DEFAULT_USER", IDR_LOGIN_DEFAULT_USER},
29 #endif
30 // Unknown names should be invalid and return -1.
31 {"foobar", -1},
32 {"backstar", -1},
35 for (size_t i = 0; i < arraysize(kCases); ++i)
36 EXPECT_EQ(kCases[i].id, ResourcesUtil::GetThemeResourceId(kCases[i].name));