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

Side by Side Diff: chrome/browser/sync/util/data_encryption_unittest.cc

Issue 9699057: [Sync] Move 'sync' target to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Tim's comments Created 8 years, 9 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/sync/util/data_encryption.h"
6
7 #include <string>
8 #include <vector>
9
10 #include "testing/gtest/include/gtest/gtest.h"
11
12 using std::string;
13 using std::vector;
14
15 namespace {
16
17 TEST(SyncDataEncryption, TestEncryptDecryptOfSampleString) {
18 vector<uint8> example(EncryptData("example"));
19 ASSERT_FALSE(example.empty());
20 string result;
21 ASSERT_TRUE(DecryptData(example, &result));
22 ASSERT_TRUE(result == "example");
23 }
24
25 TEST(SyncDataEncryption, TestDecryptFailure) {
26 vector<uint8> example(0, 0);
27 string result;
28 ASSERT_FALSE(DecryptData(example, &result));
29 }
30
31 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/sync/util/data_encryption.cc ('k') | chrome/browser/sync/util/data_type_histogram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698