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

Side by Side Diff: components/variations/entropy_provider_unittest.cc

Issue 23097007: Create variations target that depends on base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 3 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
« no previous file with comments | « components/variations/entropy_provider.cc ('k') | components/variations/metrics_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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/common/metrics/entropy_provider.h" 5 #include "components/variations/entropy_provider.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <limits> 8 #include <limits>
9 #include <numeric> 9 #include <numeric>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/guid.h" 12 #include "base/guid.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/rand_util.h" 14 #include "base/rand_util.h"
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "chrome/common/metrics/metrics_util.h" 16 #include "components/variations/metrics_util.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 namespace metrics { 19 namespace metrics {
20 20
21 namespace { 21 namespace {
22 22
23 // Size of the low entropy source to use for the permuted entropy provider 23 // Size of the low entropy source to use for the permuted entropy provider
24 // in tests. 24 // in tests.
25 const size_t kMaxLowEntropySize = 8000; 25 const size_t kMaxLowEntropySize = 8000;
26 26
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 ++count; 360 ++count;
361 } 361 }
362 362
363 ASSERT_LT(count, kMaxAttempts) << "Expected average was " << 363 ASSERT_LT(count, kMaxAttempts) << "Expected average was " <<
364 kExpectedAverage << ", average ended at " << cumulative_average << 364 kExpectedAverage << ", average ended at " << cumulative_average <<
365 ", for trial " << kTestTrialNames[i]; 365 ", for trial " << kTestTrialNames[i];
366 } 366 }
367 } 367 }
368 368
369 } // namespace metrics 369 } // namespace metrics
OLDNEW
« no previous file with comments | « components/variations/entropy_provider.cc ('k') | components/variations/metrics_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698