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

Side by Side Diff: chrome/browser/sync/credential_cache_win_unittest.cc

Issue 10656033: [sync] Automatic bootstrapping of Sync on Win 8 from cached credentials (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 8 years, 6 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/credential_cache_win.h"
6
7 #include "base/memory/ref_counted.h"
8 #include "base/path_service.h"
9 #include "base/scoped_temp_dir.h"
10 #include "base/values.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12
13 #include <string>
14
15 namespace csync {
16 namespace {
17
18 TEST(CredentialCacheTest, TestPackAndUnpack) {
19 // Pack a sample credential string.
20 std::string original = "sample_credential";
21 base::StringValue* packed = CredentialCache::PackCredential(original);
22
23 // Unpack the result and make sure it matches the original.
24 std::string unpacked;
25 CredentialCache::UnpackCredential(packed, &unpacked);
26 ASSERT_EQ(original, unpacked);
27 }
28 /*
29 TEST(SyncCredentialCacheTest, TestWriteAndRead) {
30 // Create sample SyncCredentialCache objects for auth and encryption tokens.
31 scoped_refptr<SyncCredentialCache> auth_tokens =
32 new SyncCredentialCache();
33 auth_tokens->authenticated_username = "sample_authenticated_username";
34 auth_tokens->sid = "sample_sid";
35 auth_tokens->lsid = "sample_lsid";
36 scoped_refptr<SyncCredentialCache> encryption_token =
37 new SyncCredentialCache();
38 encryption_token->encryption_bootstrap_token =
39 "sample_encryption_bootstrap_token";
40
41 // TODO(rsimha): Finish this test.
42 }
43 */
44 } // namespace
45 } // namespace csync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698