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

Side by Side Diff: tests/mbedtls_tests/ssl_tests.dart

Issue 2189923002: Update Dart binaries to 1.18.0-dev.4.4 (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « tests/dartino_tests/snapshot_stacktrace_tests.dart ('k') | third_party/bin/linux/dart.sha1 » ('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) 2016, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dartino project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 import '../dartino_compiler/run.dart' show 8 import '../dartino_compiler/run.dart' show
9 export; 9 export;
10 import 'dart:convert' show 10 import 'dart:convert' show
(...skipping 18 matching lines...) Expand all
29 String localFile(path) => Platform.script.resolve(path).toFilePath(); 29 String localFile(path) => Platform.script.resolve(path).toFilePath();
30 30
31 const String certPath = 'third_party/dart/tests/standalone/io/certificates'; 31 const String certPath = 'third_party/dart/tests/standalone/io/certificates';
32 32
33 SecurityContext createContext() { 33 SecurityContext createContext() {
34 var testDirUri = new Uri.file(testsDir); 34 var testDirUri = new Uri.file(testsDir);
35 var chain = testDirUri.resolve('../$certPath/server_chain.pem'); 35 var chain = testDirUri.resolve('../$certPath/server_chain.pem');
36 var key = testDirUri.resolve('../$certPath/server_key.pem'); 36 var key = testDirUri.resolve('../$certPath/server_key.pem');
37 var context = new SecurityContext(); 37 var context = new SecurityContext();
38 return context 38 return context
39 ..useCertificateChain(file: chain.toFilePath()) 39 ..useCertificateChain(chain.toFilePath())
40 ..usePrivateKey(key.toFilePath(), password: 'dartdart'); 40 ..usePrivateKey(key.toFilePath(), password: 'dartdart');
41 } 41 }
42 42
43 Future testGoodServer() async { 43 Future testGoodServer() async {
44 var server = await SecureServerSocket.bind(InternetAddress.LOOPBACK_IP_V4, 44 var server = await SecureServerSocket.bind(InternetAddress.LOOPBACK_IP_V4,
45 0, 45 0,
46 createContext()); 46 createContext());
47 int received = 0; 47 int received = 0;
48 server.listen((SecureSocket client) { 48 server.listen((SecureSocket client) {
49 client 49 client
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 await stdoutFuture; 119 await stdoutFuture;
120 await stderrFuture; 120 await stderrFuture;
121 Expect.equals(connections, 1); 121 Expect.equals(connections, 1);
122 Expect.equals(result, 0); 122 Expect.equals(result, 0);
123 } 123 }
124 124
125 Future testServerClient() async { 125 Future testServerClient() async {
126 await testGoodServer(); 126 await testGoodServer();
127 // await testServerDisconnect(); 127 // await testServerDisconnect();
128 } 128 }
OLDNEW
« no previous file with comments | « tests/dartino_tests/snapshot_stacktrace_tests.dart ('k') | third_party/bin/linux/dart.sha1 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698