OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library polymer.test.build.common; | 5 library polymer.test.build.common; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:barback/barback.dart'; | 9 import 'package:barback/barback.dart'; |
10 import 'package:stack_trace/stack_trace.dart'; | 10 import 'package:stack_trace/stack_trace.dart'; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // We only check messages when an expectation is provided. | 116 // We only check messages when an expectation is provided. |
117 if (messages == null) return; | 117 if (messages == null) return; |
118 expect(messages.length, messagesSeen, | 118 expect(messages.length, messagesSeen, |
119 reason: 'less messages than expected'); | 119 reason: 'less messages than expected'); |
120 }); | 120 }); |
121 } | 121 } |
122 } | 122 } |
123 | 123 |
124 testPhases(String testName, List<List<Transformer>> phases, | 124 testPhases(String testName, List<List<Transformer>> phases, |
125 Map<String, String> inputFiles, Map<String, String> expectedFiles, | 125 Map<String, String> inputFiles, Map<String, String> expectedFiles, |
126 [List<String> expectedMessages]) { | 126 [List<String> expectedMessages, bool solo = false]) { |
127 test(testName, () { | 127 (solo ? solo_test : test)(testName, () { |
128 var helper = new TestHelper(phases, inputFiles, expectedMessages)..run(); | 128 var helper = new TestHelper(phases, inputFiles, expectedMessages)..run(); |
129 return helper.checkAll(expectedFiles).then((_) => helper.tearDown()); | 129 return helper.checkAll(expectedFiles).then((_) => helper.tearDown()); |
130 }); | 130 }); |
131 } | 131 } |
132 | 132 |
133 const WEB_COMPONENTS_TAG = | 133 const WEB_COMPONENTS_TAG = |
134 '<script src="packages/web_components/platform.js"></script>\n' | 134 '<script src="packages/web_components/platform.js"></script>\n' |
135 '<script src="packages/web_components/dart_support.js"></script>\n'; | 135 '<script src="packages/web_components/dart_support.js"></script>\n'; |
136 | 136 |
137 const INTEROP_TAG = '<script src="packages/browser/interop.js"></script>\n'; | 137 const INTEROP_TAG = '<script src="packages/browser/interop.js"></script>\n'; |
138 const DART_JS_TAG = '<script src="packages/browser/dart.js"></script>'; | 138 const DART_JS_TAG = '<script src="packages/browser/dart.js"></script>'; |
139 | 139 |
OLD | NEW |