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

Side by Side Diff: pkg/polymer/test/transform/all_phases_test.dart

Issue 23678009: fixed TodoMVC tests to include deploying to JS (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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.transform.all_phases_test; 5 library polymer.test.transform.all_phases_test;
6 6
7 import 'package:polymer/src/transform.dart'; 7 import 'package:polymer/src/transform.dart';
8 import 'package:unittest/compact_vm_config.dart'; 8 import 'package:unittest/compact_vm_config.dart';
9 9
10 import 'common.dart'; 10 import 'common.dart';
(...skipping 18 matching lines...) Expand all
29 testPhases('single script', phases, { 29 testPhases('single script', phases, {
30 'a|web/test.html': 30 'a|web/test.html':
31 '<!DOCTYPE html><html><head>' 31 '<!DOCTYPE html><html><head>'
32 '<script type="application/dart" src="a.dart"></script>', 32 '<script type="application/dart" src="a.dart"></script>',
33 'a|web/test.dart': _sampleObservable('A', 'foo'), 33 'a|web/test.dart': _sampleObservable('A', 'foo'),
34 }, { 34 }, {
35 'a|web/test.html': 35 'a|web/test.html':
36 '<!DOCTYPE html><html><head></head><body>' 36 '<!DOCTYPE html><html><head></head><body>'
37 '$SHADOW_DOM_TAG' 37 '$SHADOW_DOM_TAG'
38 '$INTEROP_TAG' 38 '$INTEROP_TAG'
39 '$PKG_JS_INTEROP_TAG'
39 '<script type="application/dart" ' 40 '<script type="application/dart" '
40 'src="test.html_bootstrap.dart"></script>' 41 'src="test.html_bootstrap.dart"></script>'
41 '<script src="packages/browser/dart.js"></script>' 42 '<script src="packages/browser/dart.js"></script>'
42 '</body></html>', 43 '</body></html>',
43 44
44 'a|web/test.html_bootstrap.dart': 45 'a|web/test.html_bootstrap.dart':
45 '''library app_bootstrap; 46 '''library app_bootstrap;
46 47
47 import 'package:polymer/polymer.dart'; 48 import 'package:polymer/polymer.dart';
48 import 'dart:mirrors' show currentMirrorSystem; 49 import 'dart:mirrors' show currentMirrorSystem;
(...skipping 12 matching lines...) Expand all
61 testPhases('single inline script', phases, { 62 testPhases('single inline script', phases, {
62 'a|web/test.html': 63 'a|web/test.html':
63 '<!DOCTYPE html><html><head>' 64 '<!DOCTYPE html><html><head>'
64 '<script type="application/dart">' 65 '<script type="application/dart">'
65 '${_sampleObservable("B", "bar")}</script>', 66 '${_sampleObservable("B", "bar")}</script>',
66 }, { 67 }, {
67 'a|web/test.html': 68 'a|web/test.html':
68 '<!DOCTYPE html><html><head></head><body>' 69 '<!DOCTYPE html><html><head></head><body>'
69 '$SHADOW_DOM_TAG' 70 '$SHADOW_DOM_TAG'
70 '$INTEROP_TAG' 71 '$INTEROP_TAG'
72 '$PKG_JS_INTEROP_TAG'
71 '<script type="application/dart" ' 73 '<script type="application/dart" '
72 'src="test.html_bootstrap.dart"></script>' 74 'src="test.html_bootstrap.dart"></script>'
73 '<script src="packages/browser/dart.js"></script>' 75 '<script src="packages/browser/dart.js"></script>'
74 '</body></html>', 76 '</body></html>',
75 77
76 'a|web/test.html_bootstrap.dart': 78 'a|web/test.html_bootstrap.dart':
77 '''library app_bootstrap; 79 '''library app_bootstrap;
78 80
79 import 'package:polymer/polymer.dart'; 81 import 'package:polymer/polymer.dart';
80 import 'dart:mirrors' show currentMirrorSystem; 82 import 'dart:mirrors' show currentMirrorSystem;
(...skipping 19 matching lines...) Expand all
100 '<script type="application/dart">' 102 '<script type="application/dart">'
101 '${_sampleObservable("C", "car")}</script>' 103 '${_sampleObservable("C", "car")}</script>'
102 '</div>' 104 '</div>'
103 '<script type="application/dart" src="d.dart"></script>', 105 '<script type="application/dart" src="d.dart"></script>',
104 'a|web/a.dart': _sampleObservable('A', 'foo'), 106 'a|web/a.dart': _sampleObservable('A', 'foo'),
105 }, { 107 }, {
106 'a|web/test.html': 108 'a|web/test.html':
107 '<!DOCTYPE html><html><head></head><body>' 109 '<!DOCTYPE html><html><head></head><body>'
108 '$SHADOW_DOM_TAG' 110 '$SHADOW_DOM_TAG'
109 '$INTEROP_TAG' 111 '$INTEROP_TAG'
112 '$PKG_JS_INTEROP_TAG'
110 '<div></div>' 113 '<div></div>'
111 '<script type="application/dart" ' 114 '<script type="application/dart" '
112 'src="test.html_bootstrap.dart"></script>' 115 'src="test.html_bootstrap.dart"></script>'
113 '<script src="packages/browser/dart.js"></script>' 116 '<script src="packages/browser/dart.js"></script>'
114 '</body></html>', 117 '</body></html>',
115 118
116 'a|web/test.html_bootstrap.dart': 119 'a|web/test.html_bootstrap.dart':
117 '''library app_bootstrap; 120 '''library app_bootstrap;
118 121
119 import 'package:polymer/polymer.dart'; 122 import 'package:polymer/polymer.dart';
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 '<!DOCTYPE html><html><head></head><body>' 154 '<!DOCTYPE html><html><head></head><body>'
152 '<polymer-element>1' 155 '<polymer-element>1'
153 '<script type="application/dart">' 156 '<script type="application/dart">'
154 '${_sampleObservable("A", "foo")}</script>' 157 '${_sampleObservable("A", "foo")}</script>'
155 '</polymer-element></html>', 158 '</polymer-element></html>',
156 }, { 159 }, {
157 'a|web/index.html': 160 'a|web/index.html':
158 '<!DOCTYPE html><html><head></head><body>' 161 '<!DOCTYPE html><html><head></head><body>'
159 '$SHADOW_DOM_TAG' 162 '$SHADOW_DOM_TAG'
160 '$INTEROP_TAG' 163 '$INTEROP_TAG'
164 '$PKG_JS_INTEROP_TAG'
161 '<polymer-element>1</polymer-element>' 165 '<polymer-element>1</polymer-element>'
162 '<script type="application/dart" ' 166 '<script type="application/dart" '
163 'src="index.html_bootstrap.dart"></script>' 167 'src="index.html_bootstrap.dart"></script>'
164 '<script src="packages/browser/dart.js"></script>' 168 '<script src="packages/browser/dart.js"></script>'
165 '</body></html>', 169 '</body></html>',
166 'a|web/index.html_bootstrap.dart': 170 'a|web/index.html_bootstrap.dart':
167 '''library app_bootstrap; 171 '''library app_bootstrap;
168 172
169 import 'package:polymer/polymer.dart'; 173 import 'package:polymer/polymer.dart';
170 import 'dart:mirrors' show currentMirrorSystem; 174 import 'dart:mirrors' show currentMirrorSystem;
(...skipping 29 matching lines...) Expand all
200 String _sampleObservableOutput(String className, String fieldName) => ''' 204 String _sampleObservableOutput(String className, String fieldName) => '''
201 library ${className}_$fieldName; 205 library ${className}_$fieldName;
202 import 'package:observe/observe.dart'; 206 import 'package:observe/observe.dart';
203 207
204 class $className extends ChangeNotifierBase { 208 class $className extends ChangeNotifierBase {
205 int __\$$fieldName; 209 int __\$$fieldName;
206 int get $fieldName => __\$$fieldName; 210 int get $fieldName => __\$$fieldName;
207 set $fieldName(int value) { 211 set $fieldName(int value) {
208 __\$$fieldName = notifyPropertyChange(const Symbol('$fieldName'), __\$$field Name, value); 212 __\$$fieldName = notifyPropertyChange(const Symbol('$fieldName'), __\$$field Name, value);
209 } 213 }
210 214
211 $className($fieldName) : __\$$fieldName = $fieldName; 215 $className($fieldName) : __\$$fieldName = $fieldName;
212 } 216 }
213 '''; 217 ''';
OLDNEW
« no previous file with comments | « pkg/polymer/lib/src/transform/polyfill_injector.dart ('k') | pkg/polymer/test/transform/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698