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

Side by Side Diff: components/cronet/ios/test/start_cronet.mm

Issue 2928653002: [Cronet-iOS] Public-Key-Pinning Tests (Closed)
Patch Set: Fixed DEPS 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #import <Cronet/Cronet.h> 5 #import <Cronet/Cronet.h>
6 #import <Foundation/Foundation.h>
7 6
8 #include "components/cronet/ios/test/start_cronet.h" 7 #include "components/cronet/ios/test/start_cronet.h"
9 8
10 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
11 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
12 #include "components/grpc_support/test/quic_test_server.h"
13 11
14 namespace cronet { 12 namespace cronet {
15 13
16 void StartCronet(int port) { 14 void StartCronet(int port) {
17 [Cronet setUserAgent:@"CronetTest/1.0.0.0" partial:NO]; 15 [Cronet setUserAgent:@"CronetTest/1.0.0.0" partial:NO];
18 [Cronet setHttp2Enabled:true]; 16 [Cronet setHttp2Enabled:true];
19 [Cronet setQuicEnabled:true]; 17 [Cronet setQuicEnabled:true];
20 [Cronet setAcceptLanguages:@"en-US,en"]; 18 [Cronet setAcceptLanguages:@"en-US,en"];
21 [Cronet addQuicHint:@"test.example.com" port:443 altPort:443]; 19 [Cronet addQuicHint:@"test.example.com" port:443 altPort:443];
22 [Cronet enableTestCertVerifierForTesting]; 20 [Cronet enableTestCertVerifierForTesting];
23 [Cronet setHttpCacheType:CRNHttpCacheTypeDisabled]; 21 [Cronet setHttpCacheType:CRNHttpCacheTypeDisabled];
24 22
25 [Cronet start]; 23 [Cronet start];
26 24
27 NSString* rules = base::SysUTF8ToNSString( 25 NSString* rules = base::SysUTF8ToNSString(
28 base::StringPrintf("MAP test.example.com 127.0.0.1:%d," 26 base::StringPrintf("MAP test.example.com 127.0.0.1:%d,"
29 "MAP notfound.example.com ~NOTFOUND", 27 "MAP notfound.example.com ~NOTFOUND",
30 port)); 28 port));
31 [Cronet setHostResolverRulesForTesting:rules]; 29 [Cronet setHostResolverRulesForTesting:rules];
32 } 30 }
33 31
34 } // namespace cronet 32 } // namespace cronet
OLDNEW
« no previous file with comments | « components/cronet/ios/test/cronet_test_base.mm ('k') | components/grpc_support/test/quic_test_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698