| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart 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 file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #import("dart:io"); | 5 #import("dart:io"); |
| 6 #import("dart:uri"); | 6 #import("dart:uri"); |
| 7 #import("dart:isolate"); | 7 #import("dart:isolate"); |
| 8 | 8 |
| 9 void testGoogle() { | 9 void testGoogle() { |
| 10 HttpClient client = new HttpClient(); | 10 HttpClient client = new HttpClient(); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 connection.onRequest = (HttpClientRequest request) { | 68 connection.onRequest = (HttpClientRequest request) { |
| 69 Expect.fail("Should not open a request on bad hostname"); | 69 Expect.fail("Should not open a request on bad hostname"); |
| 70 }; | 70 }; |
| 71 ReceivePort port = new ReceivePort(); | 71 ReceivePort port = new ReceivePort(); |
| 72 connection.onError = (Exception error) { | 72 connection.onError = (Exception error) { |
| 73 port.close(); // We expect onError to be called, due to bad host name. | 73 port.close(); // We expect onError to be called, due to bad host name. |
| 74 }; | 74 }; |
| 75 } | 75 } |
| 76 | 76 |
| 77 void main() { | 77 void main() { |
| 78 // TODO(sgjesse): Making empty www.google.com requests seems to fail | 78 testGoogle(); |
| 79 //on buildbot. | 79 testGoogleUrl(); |
| 80 //testGoogle(); | |
| 81 //testGoogleUrl(); | |
| 82 testInvalidUrl(); | 80 testInvalidUrl(); |
| 83 testBadHostName(); | 81 testBadHostName(); |
| 84 } | 82 } |
| OLD | NEW |