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

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

Issue 12440002: Make instances of HeaderValue and ContentType immutable (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from nweiz@ Created 7 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') | sdk/lib/io/http.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/test/request_test.dart
diff --git a/pkg/http/test/request_test.dart b/pkg/http/test/request_test.dart
index 551f694bde399b132186867ed465d0722eba0820..1ef723045eb8a08faed87617ec813bfe3b36fff6 100644
--- a/pkg/http/test/request_test.dart
+++ b/pkg/http/test/request_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// 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.
@@ -25,7 +25,7 @@ void main() {
'method': 'POST',
'path': '/',
'headers': {
- 'content-type': ['text/plain; charset=UTF-8'],
+ 'content-type': ['text/plain; charset=utf-8'],
'content-length': ['5']
},
'body': 'hello'
@@ -246,7 +246,7 @@ void main() {
var request = new http.Request('POST', dummyUrl);
request.bodyFields = {'hello': 'world'};
expect(request.headers[HttpHeaders.CONTENT_TYPE],
- equals('application/x-www-form-urlencoded; charset=UTF-8'));
+ equals('application/x-www-form-urlencoded; charset=utf-8'));
});
test('is set to application/x-www-form-urlencoded with the given charset '
@@ -255,7 +255,7 @@ void main() {
request.encoding = Encoding.ISO_8859_1;
request.bodyFields = {'hello': 'world'};
expect(request.headers[HttpHeaders.CONTENT_TYPE],
- equals('application/x-www-form-urlencoded; charset=ISO-8859-1'));
+ equals('application/x-www-form-urlencoded; charset=iso-8859-1'));
});
test('is set to text/plain and the given encoding if body and encoding are '
@@ -264,7 +264,7 @@ void main() {
request.encoding = Encoding.ISO_8859_1;
request.body = 'hello, world';
expect(request.headers[HttpHeaders.CONTENT_TYPE],
- equals('text/plain; charset=ISO-8859-1'));
+ equals('text/plain; charset=iso-8859-1'));
});
test('is modified to include utf-8 if body is set', () {
@@ -272,7 +272,7 @@ void main() {
request.headers[HttpHeaders.CONTENT_TYPE] = 'application/json';
request.body = '{"hello": "world"}';
expect(request.headers[HttpHeaders.CONTENT_TYPE],
- equals('application/json; charset=UTF-8'));
+ equals('application/json; charset=utf-8'));
});
test('is modified to include the given encoding if encoding is set', () {
@@ -280,7 +280,7 @@ void main() {
request.headers[HttpHeaders.CONTENT_TYPE] = 'application/json';
request.encoding = Encoding.ISO_8859_1;
expect(request.headers[HttpHeaders.CONTENT_TYPE],
- equals('application/json; charset=ISO-8859-1'));
+ equals('application/json; charset=iso-8859-1'));
});
test('has its charset overridden by an explicit encoding', () {
@@ -289,7 +289,7 @@ void main() {
'application/json; charset=utf-8';
request.encoding = Encoding.ISO_8859_1;
expect(request.headers[HttpHeaders.CONTENT_TYPE],
- equals('application/json; charset=ISO-8859-1'));
+ equals('application/json; charset=iso-8859-1'));
});
test("doen't have its charset overridden by setting bodyFields", () {
« no previous file with comments | « pkg/http/test/multipart_test.dart ('k') | sdk/lib/io/http.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698