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

Side by Side Diff: pkg/intl/test/date_time_format_http_request_test.dart

Issue 11050004: Make the date_time_format_http_request_test run faster (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/intl/test/date_time_format_test_core.dart » ('j') | 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 // or details. All rights reserved. Use of this source code is governed by a 2 // or 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 /** 5 /**
6 * Test date formatting and parsing using locale data read via an http request 6 * Test date formatting and parsing using locale data read via an http request
7 * to a server. 7 * to a server.
8 */ 8 */
9 9
10 // TODO(alanknight): It would be nice if there were a more general facility 10 // TODO(alanknight): It would be nice if there were a more general facility
(...skipping 19 matching lines...) Expand all
30 // Initialize one locale just so we know what the list is. 30 // Initialize one locale just so we know what the list is.
31 test('Run everything', () { 31 test('Run everything', () {
32 initializeDateFormatting("en_US", url).then(expectAsync1(runEverything));}); 32 initializeDateFormatting("en_US", url).then(expectAsync1(runEverything));});
33 } 33 }
34 34
35 void runEverything(_) { 35 void runEverything(_) {
36 // Initialize all locales and wait for them to finish before running tests. 36 // Initialize all locales and wait for them to finish before running tests.
37 var futures = DateFormat.allLocalesWithSymbols().map( 37 var futures = DateFormat.allLocalesWithSymbols().map(
38 (locale) => initializeDateFormatting(locale, url)); 38 (locale) => initializeDateFormatting(locale, url));
39 Futures.wait(futures).then(expectAsync1((_) { 39 Futures.wait(futures).then(expectAsync1((_) {
40 runDateTests(); 40 runDateTests(smallSetOfLocales());
41 shutDown();})); 41 shutDown();}));
42 } 42 }
43 43
44 void shutDown() { 44 void shutDown() {
45 // The tiny web server knows to use this request as a cue to terminate. 45 // The tiny web server knows to use this request as a cue to terminate.
46 var source = '${url}terminate'; 46 var source = '${url}terminate';
47 var request = new HttpRequest.get(source, (_) {}); 47 var request = new HttpRequest.get(source, (_) {});
48 } 48 }
OLDNEW
« no previous file with comments | « no previous file | pkg/intl/test/date_time_format_test_core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698