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

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

Issue 13860006: Fix static type errors in a number of tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/io/http_auth_test.dart ('k') | tests/standalone/io/raw_secure_server_socket_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/raw_secure_server_socket_argument_test.dart
diff --git a/tests/standalone/io/raw_secure_server_socket_argument_test.dart b/tests/standalone/io/raw_secure_server_socket_argument_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..6c78cbc7f6ffe889846f99213997934f47edbe05
--- /dev/null
+++ b/tests/standalone/io/raw_secure_server_socket_argument_test.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// VMOptions=
+// VMOptions=--short_socket_read
+// VMOptions=--short_socket_write
+// VMOptions=--short_socket_read --short_socket_write
+
+import "package:expect/expect.dart";
+import "dart:async";
+import "dart:io";
+import "dart:isolate";
+
+const SERVER_ADDRESS = "127.0.0.1";
+const CERTIFICATE = "localhost_cert";
+
+
+void testArguments() {
+ Expect.throws(() =>
+ RawSecureServerSocket.bind(SERVER_ADDRESS, 65536, 5, CERTIFICATE));
+ Expect.throws(() =>
+ RawSecureServerSocket.bind(SERVER_ADDRESS, -1, CERTIFICATE));
+ Expect.throws(() =>
+ RawSecureServerSocket.bind(SERVER_ADDRESS, 0, -1, CERTIFICATE));
+}
+
+
+main() {
+ Path scriptDir = new Path(new Options().script).directoryPath;
+ Path certificateDatabase = scriptDir.append('pkcert');
+ SecureSocket.initialize(database: certificateDatabase.toNativePath(),
+ password: 'dartdart',
+ useBuiltinRoots: false);
+ testArguments();
+}
« no previous file with comments | « tests/standalone/io/http_auth_test.dart ('k') | tests/standalone/io/raw_secure_server_socket_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698