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

Unified Diff: tests/standalone/io/secure_socket_test.dart

Issue 11419138: Rename TlsSocket to SecureSocket, and all other Tls... items to Secure.... (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rename C++ class from Filter to SSLFilter. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/io/secure_server_test.dart ('k') | tests/standalone/io/secure_stream_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/secure_socket_test.dart
diff --git a/tests/standalone/io/tls_socket_test.dart b/tests/standalone/io/secure_socket_test.dart
similarity index 76%
rename from tests/standalone/io/tls_socket_test.dart
rename to tests/standalone/io/secure_socket_test.dart
index 1a82d2d949b9d873fa939f8381163413b2c2d21e..36386f0d9b7dfe8c282439c89413ae18747d7e73 100644
--- a/tests/standalone/io/tls_socket_test.dart
+++ b/tests/standalone/io/secure_socket_test.dart
@@ -28,32 +28,32 @@ void WriteAndClose(Socket socket, String message) {
void main() {
var testPkcertDatabase =
new Path.fromNative(new Options().script).directoryPath.append('pkcert/');
- TlsSocket.setCertificateDatabase(testPkcertDatabase.toNativePath());
- // TODO(3593): Use a Dart HTTPS server for this test using TLS server sockets.
+ SecureSocket.setCertificateDatabase(testPkcertDatabase.toNativePath());
+ // TODO(3593): Use a Dart HTTPS server for this test.
// When we use a Dart HTTPS server, allow --short_socket_write. The flag
// causes fragmentation of the client hello message, which doesn't seem to
// work with www.google.dk.
- var tls = new TlsSocket("www.google.dk", 443);
+ var secure = new SecureSocket("www.google.dk", 443);
List<String> chunks = <String>[];
- tls.onConnect = () {
- WriteAndClose(tls, "GET / HTTP/1.0\r\nHost: www.google.dk\r\n\r\n");
+ secure.onConnect = () {
+ WriteAndClose(secure, "GET / HTTP/1.0\r\nHost: www.google.dk\r\n\r\n");
};
var useReadList; // Mutually recursive onData callbacks.
void useRead() {
- var data = tls.read();
+ var data = secure.read();
var received = new String.fromCharCodes(data);
chunks.add(received);
- tls.onData = useReadList;
+ secure.onData = useReadList;
}
useReadList = () {
var buffer = new List(2000);
- int len = tls.readList(buffer, 0, 2000);
+ int len = secure.readList(buffer, 0, 2000);
var received = new String.fromCharCodes(buffer.getRange(0, len));
chunks.add(received);
- tls.onData = useRead;
+ secure.onData = useRead;
};
- tls.onData = useRead;
- tls.onClosed = () {
+ secure.onData = useRead;
+ secure.onClosed = () {
String fullPage = Strings.concatAll(chunks);
Expect.isTrue(fullPage.contains('</body></html>'));
};
« no previous file with comments | « tests/standalone/io/secure_server_test.dart ('k') | tests/standalone/io/secure_stream_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698