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

Side by Side Diff: net/base/keygen_handler_unittest.cc

Issue 201673006: net/ compile fixes for for chromeos use_openssl=1 build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 8 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 | « no previous file | net/net.gyp » ('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) 2011 The Chromium Authors. All rights reserved. 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 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 "net/base/keygen_handler.h" 5 #include "net/base/keygen_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 13 matching lines...) Expand all
24 namespace net { 24 namespace net {
25 25
26 namespace { 26 namespace {
27 27
28 class KeygenHandlerTest : public ::testing::Test { 28 class KeygenHandlerTest : public ::testing::Test {
29 public: 29 public:
30 KeygenHandlerTest() {} 30 KeygenHandlerTest() {}
31 virtual ~KeygenHandlerTest() {} 31 virtual ~KeygenHandlerTest() {}
32 32
33 virtual void SetUp() { 33 virtual void SetUp() {
34 #if defined(OS_CHROMEOS) 34 #if defined(OS_CHROMEOS) && defined(USE_NSS)
35 crypto::OpenPersistentNSSDB(); 35 crypto::OpenPersistentNSSDB();
36 #endif 36 #endif
37 } 37 }
38 }; 38 };
39 39
40 // Assert that |result| is a valid output for KeygenHandler given challenge 40 // Assert that |result| is a valid output for KeygenHandler given challenge
41 // string of |challenge|. 41 // string of |challenge|.
42 void AssertValidSignedPublicKeyAndChallenge(const std::string& result, 42 void AssertValidSignedPublicKeyAndChallenge(const std::string& result,
43 const std::string& challenge) { 43 const std::string& challenge) {
44 ASSERT_GT(result.length(), 0U); 44 ASSERT_GT(result.length(), 0U);
45 45
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 events[i] = NULL; 125 events[i] = NULL;
126 126
127 VLOG(1) << "KeygenHandler " << i << " produced: " << results[i]; 127 VLOG(1) << "KeygenHandler " << i << " produced: " << results[i];
128 AssertValidSignedPublicKeyAndChallenge(results[i], "some challenge"); 128 AssertValidSignedPublicKeyAndChallenge(results[i], "some challenge");
129 } 129 }
130 } 130 }
131 131
132 } // namespace 132 } // namespace
133 133
134 } // namespace net 134 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698