Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: chrome/browser/metrics/variations/generated_resources_map_lookup_unittest.cc

Issue 370463003: Add support for variations controlled overriding UI strings to the variations service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #include "chrome/browser/metrics/variations/generated_resources_map.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace chrome_variations {
10
11 TEST(GeneratedResourcesMapLookupTest, LookupNotFound) {
12 EXPECT_EQ(-1, GetResourceIndex(0));
13 EXPECT_EQ(-1, GetResourceIndex(kResourceHashes[kNumResources - 1] + 1));
14
15 // Lookup a hash that shouldn't exist.
16 // 13257681U is 1 + the hash for IDS_ZOOM_NORMAL
17 EXPECT_EQ(-1, GetResourceIndex(13257681U));
18 }
19
20 TEST(GeneratedResourcesMapLookupTest, LookupFound) {
21 for (size_t i = 0; i < kNumResources; ++i)
22 EXPECT_EQ(kResourceIndices[i], GetResourceIndex(kResourceHashes[i]));
23 }
24
25 } // namespace chrome_variations
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698