Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / metrics / variations / generated_resources_map_lookup_unittest.cc
bloba97f1f6cf5db2d3247e0fbe26af7825516ec7c38
1 // Copyright 2014 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/metrics/variations/generated_resources_map.h"
7 #include "testing/gtest/include/gtest/gtest.h"
9 namespace chrome_variations {
11 TEST(GeneratedResourcesMapLookupTest, LookupNotFound) {
12 EXPECT_EQ(-1, GetResourceIndex(0));
13 EXPECT_EQ(-1, GetResourceIndex(kResourceHashes[kNumResources - 1] + 1));
15 // Lookup a hash that shouldn't exist.
16 // 13257681U is 1 + the hash for IDS_ZOOM_NORMAL
17 EXPECT_EQ(-1, GetResourceIndex(13257681U));
20 TEST(GeneratedResourcesMapLookupTest, LookupFound) {
21 for (size_t i = 0; i < kNumResources; ++i)
22 EXPECT_EQ(kResourceIndices[i], GetResourceIndex(kResourceHashes[i]));
25 } // namespace chrome_variations