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

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

Issue 11641005: Add cross-origin test with credentials. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
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 /** 5 /**
6 * Tests date formatting and parsing using locale data read from the 6 * Tests date formatting and parsing using locale data read from the
7 * local file system. 7 * local file system.
8 */ 8 */
9 library date_time_format_file_test; 9 library date_time_format_file_test;
10 10
11 import '../lib/intl.dart'; 11 import 'package:intl/intl.dart';
12 import '../lib/date_symbol_data_file.dart'; 12 import 'package:intl/date_symbol_data_file.dart';
13 import 'dart:io'; 13 import 'dart:io';
14 import 'date_time_format_test_core.dart'; 14 import 'date_time_format_test_core.dart';
15 import 'data_directory.dart'; 15 import 'data_directory.dart';
16 import '../../../pkg/unittest/lib/unittest.dart'; 16 import 'package:unittest/unittest.dart';
17 17
18 runWith([Function getSubset]) { 18 runWith([Function getSubset]) {
19 // Initialize one locale just so we know what the list is. 19 // Initialize one locale just so we know what the list is.
20 test('Run all date formatting tests with locales from files', () { 20 test('Run all date formatting tests with locales from files', () {
21 initializeDateFormatting("en_US", dataDirectory).then( 21 initializeDateFormatting("en_US", dataDirectory).then(
22 expectAsync1((_) => runEverything(getSubset))); 22 expectAsync1((_) => runEverything(getSubset)));
23 }); 23 });
24 } 24 }
25 25
26 void runEverything(Function getSubset) { 26 void runEverything(Function getSubset) {
27 // Initialize all locales sequentially before running tests. Be sure not 27 // Initialize all locales sequentially before running tests. Be sure not
28 // to do it in parallel or we can run into ulimit problems on fast machines. 28 // to do it in parallel or we can run into ulimit problems on fast machines.
29 var futureList = Futures.forEach(DateFormat.allLocalesWithSymbols(), 29 var futureList = Futures.forEach(DateFormat.allLocalesWithSymbols(),
30 (locale) => initializeDateFormatting(locale, dataDirectory)); 30 (locale) => initializeDateFormatting(locale, dataDirectory));
31 31
32 test('Run all date formatting tests nested test', () { 32 test('Run all date formatting tests nested test', () {
33 futureList.then( 33 futureList.then(
34 expectAsync1((results) => runDateTests(getSubset()))); 34 expectAsync1((results) => runDateTests(getSubset())));
35 }); 35 });
36 } 36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698