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

Side by Side Diff: tests/standalone/io/http_headers_test.dart

Issue 11363206: More function literal changes in tests. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/isolate/spawn_function_custom_class_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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:math'; 5 import 'dart:math';
6 6
7 part "../../../sdk/lib/io/input_stream.dart"; 7 part "../../../sdk/lib/io/input_stream.dart";
8 part "../../../sdk/lib/io/output_stream.dart"; 8 part "../../../sdk/lib/io/output_stream.dart";
9 part "../../../sdk/lib/io/chunked_stream.dart"; 9 part "../../../sdk/lib/io/chunked_stream.dart";
10 part "../../../sdk/lib/io/string_stream.dart"; 10 part "../../../sdk/lib/io/string_stream.dart";
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 void testEnumeration() { 166 void testEnumeration() {
167 _HttpHeaders headers = new _HttpHeaders(); 167 _HttpHeaders headers = new _HttpHeaders();
168 Expect.isNull(headers[HttpHeaders.PRAGMA]); 168 Expect.isNull(headers[HttpHeaders.PRAGMA]);
169 headers.add("My-Header-1", "value 1"); 169 headers.add("My-Header-1", "value 1");
170 headers.add("My-Header-2", "value 2"); 170 headers.add("My-Header-2", "value 2");
171 headers.add("My-Header-1", "value 3"); 171 headers.add("My-Header-1", "value 3");
172 bool myHeader1 = false; 172 bool myHeader1 = false;
173 bool myHeader2 = false; 173 bool myHeader2 = false;
174 int totalValues = 0; 174 int totalValues = 0;
175 headers.forEach(f(String name, List<String> values) { 175 headers.forEach((String name, List<String> values) {
176 totalValues += values.length; 176 totalValues += values.length;
177 if (name == "my-header-1") { 177 if (name == "my-header-1") {
178 myHeader1 = true; 178 myHeader1 = true;
179 Expect.isTrue(values.indexOf("value 1") != -1); 179 Expect.isTrue(values.indexOf("value 1") != -1);
180 Expect.isTrue(values.indexOf("value 3") != -1); 180 Expect.isTrue(values.indexOf("value 3") != -1);
181 } 181 }
182 if (name == "my-header-2") { 182 if (name == "my-header-2") {
183 myHeader2 = true; 183 myHeader2 = true;
184 Expect.isTrue(values.indexOf("value 2") != -1); 184 Expect.isTrue(values.indexOf("value 2") != -1);
185 } 185 }
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 testIfModifiedSince(); 402 testIfModifiedSince();
403 testHost(); 403 testHost();
404 testEnumeration(); 404 testEnumeration();
405 testHeaderValue(); 405 testHeaderValue();
406 testContentType(); 406 testContentType();
407 testContentTypeCache(); 407 testContentTypeCache();
408 testCookie(); 408 testCookie();
409 testInvalidCookie(); 409 testInvalidCookie();
410 testHeaderLists(); 410 testHeaderLists();
411 } 411 }
OLDNEW
« no previous file with comments | « tests/isolate/spawn_function_custom_class_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698