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

Unified Diff: dart/pkg/http_base/test/http_base_test.dart

Issue 495533003: Remove obsolete http_base package (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « dart/pkg/http_base/test/http_base_io_test.dart ('k') | dart/pkg/pkg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/pkg/http_base/test/http_base_test.dart
diff --git a/dart/pkg/http_base/test/http_base_test.dart b/dart/pkg/http_base/test/http_base_test.dart
deleted file mode 100644
index d6d97e24bc95f3234960fef9c6fa2eef360f751b..0000000000000000000000000000000000000000
--- a/dart/pkg/http_base/test/http_base_test.dart
+++ /dev/null
@@ -1,81 +0,0 @@
-library http_base.http_base_test;
-
-import 'package:http_base/http_base.dart';
-import 'package:unittest/unittest.dart';
-
-main() {
- group('headers-impl', () {
- test('empty', () {
- for (HeadersImpl emptyHeaders in [HeadersImpl.Empty,
- new HeadersImpl({})]) {
- expect(emptyHeaders.names, isEmpty);
- expect(emptyHeaders['foo'], isNull);
- expect(emptyHeaders.getMultiple('foo'), isNull);
- }
- });
-
- test('multi-value', () {
- var headers = new HeadersImpl({
- 'Single' : 'single-value',
- 'Mul' : ['mul-1', 'mul-2', 'mul-3,mul-4'],
- 'Mul-Inline' : 'mi-1,mi-2,mi-3',
- });
-
- expect(headers.names, hasLength(3));
- expect(headers.names, contains('single'));
- expect(headers.names, contains('mul'));
- expect(headers.names, contains('mul-inline'));
-
- for (var key in ['Single', 'single']) {
- expect(headers[key], equals('single-value'));
- expect(headers.getMultiple(key), equals(['single-value']));
- }
-
- for (var key in ['Mul', 'mul']) {
- expect(headers[key], equals('mul-1,mul-2,mul-3,mul-4'));
- expect(headers.getMultiple(key),
- equals(['mul-1','mul-2','mul-3','mul-4']));
- }
-
- for (var key in ['Mul-Inline', 'mul-inline']) {
- expect(headers[key], equals('mi-1,mi-2,mi-3'));
- expect(headers.getMultiple(key), equals(['mi-1','mi-2','mi-3']));
- }
- });
-
- test('cookie-headers', () {
- var headers = new HeadersImpl({
- 'Set-Cookie' : [
- 'lang=en-US; Expires=Wed, 09 Jun 2021 10:18:14 GMT',
- 'lang=de-DE; Expires=Wed, 09 Jun 2021 10:18:14 GMT',],
- 'Cookie' : ['name1=value1; name2=value2', 'name3=value3'],
- });
-
- expect(() => headers['set-cookie'], throwsArgumentError);
- expect(() => headers['cookie'], throwsArgumentError);
-
- expect(headers.getMultiple('set-cookie').toList(), equals([
- 'lang=en-US; Expires=Wed, 09 Jun 2021 10:18:14 GMT',
- 'lang=de-DE; Expires=Wed, 09 Jun 2021 10:18:14 GMT']));
-
- expect(headers.getMultiple('cookie').toList(),
- equals(['name1=value1; name2=value2', 'name3=value3']));
- });
-
- test('replace', () {
- var headers = new HeadersImpl({
- 'Single' : 'single-value',
- 'Mul' : ['mul-1', 'mul-2', 'mul-3,mul-4'],
- 'Mul-Inline' : 'mi-1,mi-2,mi-3',
- }).replace({
- 'single' : 'foo',
- 'mul' : null,
- 'mul-inline' : 'bar',
- });
-
- expect(headers.names, hasLength(2));
- expect(headers['single'], equals('foo'));
- expect(headers['mul-inline'], equals('bar'));
- });
- });
-}
« no previous file with comments | « dart/pkg/http_base/test/http_base_io_test.dart ('k') | dart/pkg/pkg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698