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

Side by Side Diff: net/ssl/default_server_bound_cert_store_unittest.cc

Issue 65813002: mac: Prepare most test code for -Wunused-functions too. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 | « content/common/input/input_param_traits_unittest.cc ('k') | ppapi/tests/test_graphics_2d.cc » ('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 "net/ssl/default_server_bound_cert_store.h" 5 #include "net/ssl/default_server_bound_cert_store.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
16 #include "net/base/net_errors.h" 16 #include "net/base/net_errors.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 namespace net { 19 namespace net {
20 20
21 namespace { 21 namespace {
22 22
23 void CallCounter(int* counter) { 23 void CallCounter(int* counter) {
24 (*counter)++; 24 (*counter)++;
25 } 25 }
26 26
27 void NotCalled() {
28 ADD_FAILURE() << "Unexpected callback execution.";
29 }
30
31 void GetCertCallbackNotCalled(int err, 27 void GetCertCallbackNotCalled(int err,
32 const std::string& server_identifier, 28 const std::string& server_identifier,
33 base::Time expiration_time, 29 base::Time expiration_time,
34 const std::string& private_key_result, 30 const std::string& private_key_result,
35 const std::string& cert_result) { 31 const std::string& cert_result) {
36 ADD_FAILURE() << "Unexpected callback execution."; 32 ADD_FAILURE() << "Unexpected callback execution.";
37 } 33 }
38 34
39 class AsyncGetCertHelper { 35 class AsyncGetCertHelper {
40 public: 36 public:
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 ++cert; 546 ++cert;
551 EXPECT_EQ("copied.com", cert->server_identifier()); 547 EXPECT_EQ("copied.com", cert->server_identifier());
552 EXPECT_EQ("g", cert->private_key()); 548 EXPECT_EQ("g", cert->private_key());
553 549
554 ++cert; 550 ++cert;
555 EXPECT_EQ("preexisting.com", cert->server_identifier()); 551 EXPECT_EQ("preexisting.com", cert->server_identifier());
556 EXPECT_EQ("a", cert->private_key()); 552 EXPECT_EQ("a", cert->private_key());
557 } 553 }
558 554
559 } // namespace net 555 } // namespace net
OLDNEW
« no previous file with comments | « content/common/input/input_param_traits_unittest.cc ('k') | ppapi/tests/test_graphics_2d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698