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

Side by Side Diff: dart/pkg/polymer/test/build/script_compactor_test.dart

Issue 336013003: Version 1.5.0-dev.4.14 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 6 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) 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.script_compactor_test; 5 library polymer.test.build.script_compactor_test;
6 6
7 import 'package:code_transformers/tests.dart' show testingDartSdkDirectory; 7 import 'package:code_transformers/tests.dart' show testingDartSdkDirectory;
8 import 'package:polymer/src/build/common.dart'; 8 import 'package:polymer/src/build/common.dart';
9 import 'package:polymer/src/build/script_compactor.dart'; 9 import 'package:polymer/src/build/script_compactor.dart';
10 import 'package:smoke/codegen/generator.dart' show DEFAULT_IMPORTS; 10 import 'package:smoke/codegen/generator.dart' show DEFAULT_IMPORTS;
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 '<div>{{ }}</div>' 660 '<div>{{ }}</div>'
661 '<div class="{{an.attribute}}"></div>' 661 '<div class="{{an.attribute}}"></div>'
662 '<a href="path/{{within.an.attribute}}/foo/bar"></a>' 662 '<a href="path/{{within.an.attribute}}/foo/bar"></a>'
663 '<div data-attribute="{{anotherAttribute}}"></div>' 663 '<div data-attribute="{{anotherAttribute}}"></div>'
664 // input and custom-element attributes are treated as 2-way bindings: 664 // input and custom-element attributes are treated as 2-way bindings:
665 '<input value="{{this.iS.twoWay}}">' 665 '<input value="{{this.iS.twoWay}}">'
666 '<input value="{{this.iS.twoWayInt | intToStringTransformer}}">' 666 '<input value="{{this.iS.twoWayInt | intToStringTransformer}}">'
667 '<something-else my-attribute="{{here.too}}"></something-else>' 667 '<something-else my-attribute="{{here.too}}"></something-else>'
668 '<div on-click="{{methodName}}"></div>' 668 '<div on-click="{{methodName}}"></div>'
669 '<div on-click="{{ methodName2 }}"></div>' // extra space is OK 669 '<div on-click="{{ methodName2 }}"></div>' // extra space is OK
670 '<div on-click="{{@read.method}}"></div>'
671 // empty handlers are invalid, but we still produce valid output. 670 // empty handlers are invalid, but we still produce valid output.
672 '<div on-click="{{}}"></div>' 671 '<div on-click="{{}}"></div>'
673 '<div on-click="{{ }}"></div>' 672 '<div on-click="{{ }}"></div>'
674 '</template></polymer-element>', 673 '</template></polymer-element>',
675 'a|web/test.html._data': expectedData(['web/a.dart']), 674 'a|web/test.html._data': expectedData(['web/a.dart']),
676 'a|web/a.dart': 675 'a|web/a.dart':
677 'library a;\n' 676 'library a;\n'
678 'import "package:polymer/polymer.dart";\n' 677 'import "package:polymer/polymer.dart";\n'
679 'main(){}', 678 'main(){}',
680 }, { 679 }, {
681 'a|web/test.html_bootstrap.dart': 680 'a|web/test.html_bootstrap.dart':
682 '''$MAIN_HEADER 681 '''$MAIN_HEADER
683 import 'a.dart' as i0; 682 import 'a.dart' as i0;
684 ${DEFAULT_IMPORTS.join('\n')} 683 ${DEFAULT_IMPORTS.join('\n')}
685 684
686 void main() { 685 void main() {
687 useGeneratedCode(new StaticConfiguration( 686 useGeneratedCode(new StaticConfiguration(
688 checkedMode: false, 687 checkedMode: false,
689 getters: { 688 getters: {
690 #a: (o) => o.a, 689 #a: (o) => o.a,
691 #an: (o) => o.an, 690 #an: (o) => o.an,
692 #anotherAttribute: (o) => o.anotherAttribute, 691 #anotherAttribute: (o) => o.anotherAttribute,
693 #anotherNode: (o) => o.anotherNode, 692 #anotherNode: (o) => o.anotherNode,
694 #attribute: (o) => o.attribute, 693 #attribute: (o) => o.attribute,
695 #call1: (o) => o.call1, 694 #call1: (o) => o.call1,
696 #call2: (o) => o.call2, 695 #call2: (o) => o.call2,
697 #here: (o) => o.here, 696 #here: (o) => o.here,
698 #iS: (o) => o.iS, 697 #iS: (o) => o.iS,
699 #intToStringTransformer: (o) => o.intToStringTransformer, 698 #intToStringTransformer: (o) => o.intToStringTransformer,
700 #method: (o) => o.method,
701 #methodName: (o) => o.methodName, 699 #methodName: (o) => o.methodName,
702 #methodName2: (o) => o.methodName2, 700 #methodName2: (o) => o.methodName2,
703 #node: (o) => o.node, 701 #node: (o) => o.node,
704 #read: (o) => o.read,
705 #too: (o) => o.too, 702 #too: (o) => o.too,
706 #twoWay: (o) => o.twoWay, 703 #twoWay: (o) => o.twoWay,
707 #twoWayInt: (o) => o.twoWayInt, 704 #twoWayInt: (o) => o.twoWayInt,
708 #within: (o) => o.within, 705 #within: (o) => o.within,
709 }, 706 },
710 setters: { 707 setters: {
711 #too: (o, v) { o.too = v; }, 708 #too: (o, v) { o.too = v; },
712 #twoWay: (o, v) { o.twoWay = v; }, 709 #twoWay: (o, v) { o.twoWay = v; },
713 #twoWayInt: (o, v) { o.twoWayInt = v; }, 710 #twoWayInt: (o, v) { o.twoWayInt = v; },
714 }, 711 },
715 names: { 712 names: {
716 #a: r'a', 713 #a: r'a',
717 #an: r'an', 714 #an: r'an',
718 #anotherAttribute: r'anotherAttribute', 715 #anotherAttribute: r'anotherAttribute',
719 #anotherNode: r'anotherNode', 716 #anotherNode: r'anotherNode',
720 #attribute: r'attribute', 717 #attribute: r'attribute',
721 #call1: r'call1', 718 #call1: r'call1',
722 #call2: r'call2', 719 #call2: r'call2',
723 #here: r'here', 720 #here: r'here',
724 #iS: r'iS', 721 #iS: r'iS',
725 #intToStringTransformer: r'intToStringTransformer', 722 #intToStringTransformer: r'intToStringTransformer',
726 #method: r'method',
727 #methodName: r'methodName', 723 #methodName: r'methodName',
728 #methodName2: r'methodName2', 724 #methodName2: r'methodName2',
729 #node: r'node', 725 #node: r'node',
730 #read: r'read',
731 #too: r'too', 726 #too: r'too',
732 #twoWay: r'twoWay', 727 #twoWay: r'twoWay',
733 #twoWayInt: r'twoWayInt', 728 #twoWayInt: r'twoWayInt',
734 #within: r'within', 729 #within: r'within',
735 })); 730 }));
736 configureForDeployment([]); 731 configureForDeployment([]);
737 i0.main(); 732 i0.main();
738 } 733 }
739 '''.replaceAll('\n ', '\n'), 734 '''.replaceAll('\n ', '\n'),
740 'a|web/a.dart': 735 'a|web/a.dart':
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 })); 967 }));
973 configureForDeployment([ 968 configureForDeployment([
974 () => Polymer.register(\'x-foo\', i0.XFoo), 969 () => Polymer.register(\'x-foo\', i0.XFoo),
975 ]); 970 ]);
976 i0.main(); 971 i0.main();
977 } 972 }
978 '''.replaceAll('\n ', '\n'), 973 '''.replaceAll('\n ', '\n'),
979 }); 974 });
980 } 975 }
981 976
OLDNEW
« no previous file with comments | « dart/pkg/polymer/test/build/linter_test.dart ('k') | dart/pkg/polymer/test/custom_event_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698