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

Side by Side Diff: chrome/common/random_unittest.cc

Issue 6873156: Move crypto_helpers from sync to base (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Follow bbretw review Created 9 years, 7 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 | « chrome/common/random.cc ('k') | ppapi/shared_impl/crypto_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 "testing/gtest/include/gtest/gtest.h"
6
7 #include "chrome/common/random.h"
8
9 TEST(SyncRandomTest, Generate128BitRandomBase64String) {
10 std::string random_string = Generate128BitRandomBase64String();
11 EXPECT_EQ(24U, random_string.size());
12 char accumulator = 0;
13 for (size_t i = 0; i < random_string.size(); ++i)
14 accumulator |= random_string[i];
15 // In theory this test can fail, but it won't before the universe dies of
16 // heat death.
17 EXPECT_NE(0, accumulator);
18 }
OLDNEW
« no previous file with comments | « chrome/common/random.cc ('k') | ppapi/shared_impl/crypto_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698