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

Unified Diff: pkg/http/test/utils.dart

Issue 216603010: Rip out dart:io from pkg/http wherever possible. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 9 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 | « pkg/http/test/multipart_test.dart ('k') | pkg/oauth2/CHANGELOG.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/test/utils.dart
diff --git a/pkg/http/test/utils.dart b/pkg/http/test/utils.dart
index ba516c95886b797ab7f7ff217c7c2a376fffbe4a..051cbd4f0936d56265c336d4613b63981ee6c58e 100644
--- a/pkg/http/test/utils.dart
+++ b/pkg/http/test/utils.dart
@@ -8,7 +8,7 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
-import 'package:http/src/byte_stream.dart';
+import 'package:http/http.dart';
import 'package:http/src/utils.dart';
import 'package:unittest/unittest.dart';
@@ -174,17 +174,9 @@ class _Parse extends Matcher {
}
}
-/// A matcher for HttpExceptions.
-const isHttpException = const _HttpException();
-
/// A matcher for functions that throw HttpException.
-const Matcher throwsHttpException =
- const Throws(isHttpException);
-
-class _HttpException extends TypeMatcher {
- const _HttpException() : super("HttpException");
- bool matches(item, Map matchState) => item is HttpException;
-}
+Matcher get throwsClientException =>
+ throwsA(new isInstanceOf<ClientException>());
/// A matcher for RedirectLimitExceededExceptions.
const isRedirectLimitExceededException =
« no previous file with comments | « pkg/http/test/multipart_test.dart ('k') | pkg/oauth2/CHANGELOG.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698