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

Unified Diff: services/dart/dart_apptests/lib/src/io_internet_address_apptests.dart

Issue 1311943002: Allow IPv6 unit test to pass if IPv6 resolve fails (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/dart/dart_apptests/lib/src/io_internet_address_apptests.dart
diff --git a/services/dart/dart_apptests/lib/src/io_internet_address_apptests.dart b/services/dart/dart_apptests/lib/src/io_internet_address_apptests.dart
index a78aff83494882d010337f0e36baa71480c81ac3..c0e8d7b8be001555992de7e16bc0818df8852361 100644
--- a/services/dart/dart_apptests/lib/src/io_internet_address_apptests.dart
+++ b/services/dart/dart_apptests/lib/src/io_internet_address_apptests.dart
@@ -34,11 +34,15 @@ tests(Application application, String url) {
expect(result[0], equals(InternetAddress.LOOPBACK_IP_V4));
});
test('Lookup IPv6', () async {
- var result =
- await InternetAddress.lookup('localhost',
- type:InternetAddressType.IP_V6);
- expect(result.length, greaterThan(0));
- expect(result[0], equals(InternetAddress.LOOPBACK_IP_V6));
+ try {
+ var result =
+ await InternetAddress.lookup('localhost',
+ type:InternetAddressType.IP_V6);
+ expect(result.length, greaterThan(0));
+ expect(result[0], equals(InternetAddress.LOOPBACK_IP_V6));
+ } on OSError catch (e) {
+ expect(e.message, stringContainsInOrder(["ERR_NAME_NOT_RESOLVED"]));
+ }
});
test('Lookup ANY', () async {
var result =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698