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

Side by Side Diff: components/metrics/variations_seed_store_unittest.cc

Issue 1271123003: Componentize VariationsSeedStore and its unittest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@componentize_variations_prefs
Patch Set: Created 5 years, 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/metrics/variations/variations_seed_store.h" 5 #include "components/metrics/variations_seed_store.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/prefs/testing_pref_service.h" 8 #include "base/prefs/testing_pref_service.h"
9 #include "components/metrics/compression_utils.h" 9 #include "components/metrics/compression_utils.h"
10 #include "components/variations/pref_names.h" 10 #include "components/variations/pref_names.h"
11 #include "components/variations/proto/study.pb.h" 11 #include "components/variations/proto/study.pb.h"
12 #include "components/variations/proto/variations_seed.pb.h" 12 #include "components/variations/proto/variations_seed.pb.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace chrome_variations { 15 namespace chrome_variations {
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 seed_store.VerifySeedSignature(seed_data, base64_seed_data)); 284 seed_store.VerifySeedSignature(seed_data, base64_seed_data));
285 #endif 285 #endif
286 286
287 // Using a different seed should not match the signature. 287 // Using a different seed should not match the signature.
288 seed_data[0] = 'x'; 288 seed_data[0] = 'x';
289 EXPECT_EQ(VariationsSeedStore::VARIATIONS_SEED_SIGNATURE_INVALID_SEED, 289 EXPECT_EQ(VariationsSeedStore::VARIATIONS_SEED_SIGNATURE_INVALID_SEED,
290 seed_store.VerifySeedSignature(seed_data, base64_seed_signature)); 290 seed_store.VerifySeedSignature(seed_data, base64_seed_signature));
291 } 291 }
292 292
293 } // namespace chrome_variations 293 } // namespace chrome_variations
OLDNEW
« components/metrics/variations_seed_store.cc ('K') | « components/metrics/variations_seed_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698