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

Side by Side Diff: pkg/polymer/test/run_all.dart

Issue 23011045: Declare the sequence of phases for the full polymer transform and add tests for (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 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 * This is a helper for run.sh. We try to run all of the Dart code in one 6 * This is a helper for run.sh. We try to run all of the Dart code in one
7 * instance of the Dart VM to reduce warm-up time. 7 * instance of the Dart VM to reduce warm-up time.
8 */ 8 */
9 library run_impl; 9 library run_impl;
10 10
11 import 'dart:io'; 11 import 'dart:io';
12 import 'package:unittest/compact_vm_config.dart'; 12 import 'package:unittest/compact_vm_config.dart';
13 import 'package:unittest/unittest.dart'; 13 import 'package:unittest/unittest.dart';
14 import 'package:polymer/testing/content_shell_test.dart'; 14 import 'package:polymer/testing/content_shell_test.dart';
15 15
16 import 'css_test.dart' as css_test; 16 import 'css_test.dart' as css_test;
17 import 'compiler_test.dart' as compiler_test; 17 import 'compiler_test.dart' as compiler_test;
18 import 'paths_test.dart' as paths_test; 18 import 'paths_test.dart' as paths_test;
19 import 'utils_test.dart' as utils_test; 19 import 'utils_test.dart' as utils_test;
20 import 'transform/code_extractor_test.dart' as code_extractor_test; 20 import 'transform/code_extractor_test.dart' as code_extractor_test;
21 import 'transform/import_inliner_test.dart' as import_inliner_test; 21 import 'transform/import_inliner_test.dart' as import_inliner_test;
22 import 'transform/script_compactor_test.dart' as script_compactor_test; 22 import 'transform/script_compactor_test.dart' as script_compactor_test;
23 import 'transform/all_phases_test.dart' as all_phases_test;
23 24
24 main() { 25 main() {
25 var args = new Options().arguments; 26 var args = new Options().arguments;
26 var pattern = new RegExp(args.length > 0 ? args[0] : '.'); 27 var pattern = new RegExp(args.length > 0 ? args[0] : '.');
27 28
28 useCompactVMConfiguration(); 29 useCompactVMConfiguration();
29 30
30 void addGroup(testFile, testMain) { 31 void addGroup(testFile, testMain) {
31 if (pattern.hasMatch(testFile)) { 32 if (pattern.hasMatch(testFile)) {
32 group(testFile.replaceAll('_test.dart', ':'), testMain); 33 group(testFile.replaceAll('_test.dart', ':'), testMain);
33 } 34 }
34 } 35 }
35 36
36 addGroup('compiler_test.dart', compiler_test.main); 37 addGroup('compiler_test.dart', compiler_test.main);
37 addGroup('css_test.dart', css_test.main); 38 addGroup('css_test.dart', css_test.main);
38 addGroup('paths_test.dart', paths_test.main); 39 addGroup('paths_test.dart', paths_test.main);
39 addGroup('utils_test.dart', utils_test.main); 40 addGroup('utils_test.dart', utils_test.main);
40 addGroup('transform/code_extractor_test.dart', code_extractor_test.main); 41 addGroup('transform/code_extractor_test.dart', code_extractor_test.main);
41 addGroup('transform/import_inliner_test.dart', import_inliner_test.main); 42 addGroup('transform/import_inliner_test.dart', import_inliner_test.main);
42 addGroup('transform/script_compactor_test.dart', script_compactor_test.main); 43 addGroup('transform/script_compactor_test.dart', script_compactor_test.main);
44 addGroup('transform/all_phases_test.dart', all_phases_test.main);
43 45
44 endToEndTests('data/unit/', 'data/out'); 46 endToEndTests('data/unit/', 'data/out');
45 47
46 // Note: if you're adding more render test suites, make sure to update run.sh 48 // Note: if you're adding more render test suites, make sure to update run.sh
47 // as well for convenient baseline diff/updating. 49 // as well for convenient baseline diff/updating.
48 50
49 // TODO(jmesserly): figure out why this fails in content_shell but works in 51 // TODO(jmesserly): figure out why this fails in content_shell but works in
50 // Dartium and Firefox when using the ShadowDOM polyfill. 52 // Dartium and Firefox when using the ShadowDOM polyfill.
51 exampleTest('../example/component/news', ['--no-shadowdom']..addAll(args)); 53 exampleTest('../example/component/news', ['--no-shadowdom']..addAll(args));
52 54
(...skipping 22 matching lines...) Expand all
75 arguments: args, pattern: pattern, deleteDir: deleteDirectory); 77 arguments: args, pattern: pattern, deleteDir: deleteDirectory);
76 } 78 }
77 79
78 void cssCompileShadowDOMTest(String path, String pattern, 80 void cssCompileShadowDOMTest(String path, String pattern,
79 [bool deleteDirectory = true]) { 81 [bool deleteDirectory = true]) {
80 var args = ['--no-css']; 82 var args = ['--no-css'];
81 renderTests(path, path, '$path/expected', '$path/out', 83 renderTests(path, path, '$path/expected', '$path/out',
82 arguments: args, pattern: pattern, 84 arguments: args, pattern: pattern,
83 deleteDir: deleteDirectory); 85 deleteDir: deleteDirectory);
84 } 86 }
OLDNEW
« no previous file with comments | « pkg/polymer/lib/src/transform/script_compactor.dart ('k') | pkg/polymer/test/transform/all_phases_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698