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

Side by Side Diff: components/cronet/ios/test/cronet_test_base.h

Issue 2937523002: add setter for enable_pkp_bypass_etc (Closed)
Patch Set: add test for set_enable_pkp_bypass_etc Created 3 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #ifndef PRODUCTS_CRONET_TEST_BASE_H 5 #ifndef PRODUCTS_CRONET_TEST_BASE_H
6 #define PRODUCTS_CRONET_TEST_BASE_H 6 #define PRODUCTS_CRONET_TEST_BASE_H
7 7
8 #include "Cronet/Cronet.h" 8 #include "Cronet/Cronet.h"
9 #include "net/cert/cert_verifier.h" 9 #include "net/cert/cert_verifier.h"
10 #include "net/cert/x509_certificate.h" 10 #include "net/cert/x509_certificate.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 #pragma mark 13 #pragma mark
14 14
15 // Exposes private test-only methods of the Cronet class. 15 // Exposes private test-only methods of the Cronet class.
16 @interface Cronet (ExposedForTesting) 16 @interface Cronet (ExposedForTesting)
17 + (void)shutdownForTesting; 17 + (void)shutdownForTesting;
18 + (void)setMockCertVerifier:(std::unique_ptr<net::CertVerifier>)certVerifier; 18 + (void)setMockCertVerifier:(std::unique_ptr<net::CertVerifier>)certVerifier;
19 + (void)setEnablePublicKeyPinningBypassForLocalTrustAnchors:(bool)enable;
mef 2017/06/13 20:52:58 BOOL
lilyhoughton 2017/06/14 15:58:42 Done.
19 @end 20 @end
20 21
21 // NSURLSessionDataDelegate delegate implementation used by the tests to 22 // NSURLSessionDataDelegate delegate implementation used by the tests to
22 // wait for a response and check its status. 23 // wait for a response and check its status.
23 @interface TestDelegate : NSObject<NSURLSessionDataDelegate> 24 @interface TestDelegate : NSObject<NSURLSessionDataDelegate>
24 25
25 // Completion semaphore for this TestDelegate. When the request this delegate is 26 // Completion semaphore for this TestDelegate. When the request this delegate is
26 // attached to finishes (either successfully or with an error), this delegate 27 // attached to finishes (either successfully or with an error), this delegate
27 // signals this semaphore. 28 // signals this semaphore.
28 @property(strong, atomic) dispatch_semaphore_t semaphore; 29 @property(strong, atomic) dispatch_semaphore_t semaphore;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 bool known_root); 64 bool known_root);
64 65
65 ::testing::AssertionResult IsResponseSuccessful(); 66 ::testing::AssertionResult IsResponseSuccessful();
66 67
67 TestDelegate* delegate_; 68 TestDelegate* delegate_;
68 }; // class CronetTestBase 69 }; // class CronetTestBase
69 70
70 } // namespace cronet 71 } // namespace cronet
71 72
72 #endif // PRODUCTS_CRONET_TEST_BASE_H 73 #endif // PRODUCTS_CRONET_TEST_BASE_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698