| 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 * These are not quite unit tests, since we build on top of the analyzer and the | 6 * These are not quite unit tests, since we build on top of the analyzer and the |
| 7 * html5parser to build the input for each test. | 7 * html5parser to build the input for each test. |
| 8 */ | 8 */ |
| 9 library emitter_test; | 9 library emitter_test; |
| 10 | 10 |
| 11 import 'package:html5lib/dom.dart'; | 11 import 'package:html5lib/dom.dart'; |
| 12 import 'package:unittest/unittest.dart'; | 12 import 'package:unittest/unittest.dart'; |
| 13 import 'package:unittest/vm_config.dart'; | 13 import 'package:unittest/vm_config.dart'; |
| 14 import 'package:web_components/src/analyzer.dart'; | 14 import 'package:web_ui/src/analyzer.dart'; |
| 15 import 'package:web_components/src/emitters.dart'; | 15 import 'package:web_ui/src/emitters.dart'; |
| 16 import 'package:web_components/src/html5_utils.dart'; | 16 import 'package:web_ui/src/html5_utils.dart'; |
| 17 import 'package:web_components/src/info.dart'; | 17 import 'package:web_ui/src/info.dart'; |
| 18 import 'package:web_components/src/file_system/path.dart' show Path; | 18 import 'package:web_ui/src/file_system/path.dart' show Path; |
| 19 import 'testing.dart'; | 19 import 'testing.dart'; |
| 20 | 20 |
| 21 | 21 |
| 22 main() { | 22 main() { |
| 23 useVmConfiguration(); | 23 useVmConfiguration(); |
| 24 useMockMessages(); | 24 useMockMessages(); |
| 25 group('emit element field', () { | 25 group('emit element field', () { |
| 26 group('declaration', () { | 26 group('declaration', () { |
| 27 test('no data binding', () { | 27 test('no data binding', () { |
| 28 var elem = parseSubtree('<div></div>'); | 28 var elem = parseSubtree('<div></div>'); |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 var context = new Context(); | 440 var context = new Context(); |
| 441 new RecursiveEmitter(null, context).visit(info); | 441 new RecursiveEmitter(null, context).visit(info); |
| 442 return context.createdMethod.toString().trim(); | 442 return context.createdMethod.toString().trim(); |
| 443 } | 443 } |
| 444 | 444 |
| 445 _declarationsRecursive(ElementInfo info) { | 445 _declarationsRecursive(ElementInfo info) { |
| 446 var context = new Context(); | 446 var context = new Context(); |
| 447 new RecursiveEmitter(null, context).visit(info); | 447 new RecursiveEmitter(null, context).visit(info); |
| 448 return context.declarations.toString().trim(); | 448 return context.declarations.toString().trim(); |
| 449 } | 449 } |
| OLD | NEW |