| OLD | NEW |
| 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 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 'reset.css', false); | 75 'reset.css', false); |
| 76 cssCompileShadowDOMTest('data/input/css_compile', | 76 cssCompileShadowDOMTest('data/input/css_compile', |
| 77 'index_apply_shadow_dom_test\.html', false); | 77 'index_apply_shadow_dom_test\.html', false); |
| 78 | 78 |
| 79 exampleTest('../example/component/news'); | 79 exampleTest('../example/component/news'); |
| 80 exampleTest('../example/todomvc', ['--no-css']); | 80 exampleTest('../example/todomvc', ['--no-css']); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void exampleTest(String path, [List<String> args]) { | 83 void exampleTest(String path, [List<String> args]) { |
| 84 renderTests(path, '$path/test', '$path/test/expected', '$path/test/out', | 84 renderTests(path, '$path/test', '$path/test/expected', '$path/test/out', |
| 85 args); | 85 arguments: args); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void cssCompileMangleTest(String path, String pattern, | 88 void cssCompileMangleTest(String path, String pattern, |
| 89 [bool deleteDirectory = true]) { | 89 [bool deleteDirectory = true]) { |
| 90 renderTests(path, path, '$path/expected', '$path/out', | 90 renderTests(path, path, '$path/expected', '$path/out', |
| 91 ['--css-mangle'], null, pattern, deleteDirectory); | 91 arguments: ['--css-mangle'], pattern: pattern, |
| 92 deleteDir: deleteDirectory); |
| 92 } | 93 } |
| 93 | 94 |
| 94 void cssCompilePolyFillTest(String path, String pattern, String cssReset, | 95 void cssCompilePolyFillTest(String path, String pattern, String cssReset, |
| 95 [bool deleteDirectory = true]) { | 96 [bool deleteDirectory = true]) { |
| 96 var args = ['--no-css-mangle']; | 97 var args = ['--no-css-mangle']; |
| 97 if (cssReset != null) { | 98 if (cssReset != null) { |
| 98 args.addAll(['--css-reset', '${path}/${cssReset}']); | 99 args.addAll(['--css-reset', '${path}/${cssReset}']); |
| 99 } | 100 } |
| 100 renderTests(path, path, '$path/expected', '$path/out', args, null, pattern, | 101 renderTests(path, path, '$path/expected', '$path/out', |
| 101 deleteDirectory); | 102 arguments: args, pattern: pattern, deleteDir: deleteDirectory); |
| 102 } | 103 } |
| 103 | 104 |
| 104 void cssCompileShadowDOMTest(String path, String pattern, | 105 void cssCompileShadowDOMTest(String path, String pattern, |
| 105 [bool deleteDirectory = true]) { | 106 [bool deleteDirectory = true]) { |
| 106 var args = ['--no-css']; | 107 var args = ['--no-css']; |
| 107 renderTests(path, path, '$path/expected', '$path/out', args, null, pattern, | 108 renderTests(path, path, '$path/expected', '$path/out', |
| 108 deleteDirectory); | 109 arguments: args, pattern: pattern, |
| 110 deleteDir: deleteDirectory); |
| 109 } | 111 } |
| OLD | NEW |