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

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

Issue 723393003: update to polymer js 0.5.1 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: final tweaks Created 6 years 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.polyfill_injector_test; 5 library polymer.test.build.polyfill_injector_test;
6 6
7 import 'package:polymer/src/build/common.dart'; 7 import 'package:polymer/src/build/common.dart';
8 import 'package:polymer/src/build/polyfill_injector.dart'; 8 import 'package:polymer/src/build/polyfill_injector.dart';
9 import 'package:unittest/compact_vm_config.dart'; 9 import 'package:unittest/compact_vm_config.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 '<script type="application/dart" src="a.dart"></script>', 43 '<script type="application/dart" src="a.dart"></script>',
44 }); 44 });
45 45
46 testPhases('with some script', phases, { 46 testPhases('with some script', phases, {
47 'a|web/test.html': 47 'a|web/test.html':
48 '<!DOCTYPE html><html><head></head><body>' 48 '<!DOCTYPE html><html><head></head><body>'
49 '<script type="application/dart" src="a.dart"></script>', 49 '<script type="application/dart" src="a.dart"></script>',
50 }, { 50 }, {
51 'a|web/test.html': 51 'a|web/test.html':
52 '<!DOCTYPE html><html><head>' 52 '<!DOCTYPE html><html><head>'
53 '$WEB_COMPONENTS_TAG' 53 '$COMPATIBILITY_JS_TAGS'
54 '</head><body>' 54 '</head><body>'
55 '<script ${type}src="a.dart$ext"$async></script>' 55 '<script ${type}src="a.dart$ext"$async></script>'
56 '$dartJsTag' 56 '$dartJsTag'
57 '</body></html>', 57 '</body></html>',
58 }); 58 });
59 59
60 testPhases('interop/shadow dom already present', phases, { 60 testPhases('interop/shadow dom already present', phases, {
61 'a|web/test.html': 61 'a|web/test.html':
62 '<!DOCTYPE html><html><head>' 62 '<!DOCTYPE html><html><head>'
63 '$WEB_COMPONENTS_TAG' 63 '$COMPATIBILITY_JS_TAGS'
64 '</head><body>' 64 '</head><body>'
65 '<script type="application/dart" src="a.dart"></script>' 65 '<script type="application/dart" src="a.dart"></script>'
66 '$dartJsTag' 66 '$dartJsTag'
67 }, { 67 }, {
68 'a|web/test.html': 68 'a|web/test.html':
69 '<!DOCTYPE html><html><head>' 69 '<!DOCTYPE html><html><head>'
70 '$WEB_COMPONENTS_TAG' 70 '$COMPATIBILITY_JS_TAGS'
71 '</head><body>' 71 '</head><body>'
72 '<script ${type}src="a.dart$ext"$async></script>' 72 '<script ${type}src="a.dart$ext"$async></script>'
73 '$dartJsTag' 73 '$dartJsTag'
74 '</body></html>', 74 '</body></html>',
75 }); 75 });
76 76
77 testPhases('dart_support.js after platform.js, platform present', phases, { 77 testPhases(
78 'dart_support.js after webcomponents.js, web_components present', phases,
79 {
78 'a|web/test.html': 80 'a|web/test.html':
79 '<!DOCTYPE html><html><head>' 81 '<!DOCTYPE html><html><head>'
80 '$PLATFORM_JS_TAG' 82 '$WEB_COMPONENTS_JS_TAG'
81 '</head><body>' 83 '</head><body>'
82 '<script type="application/dart" src="a.dart"></script>' 84 '<script type="application/dart" src="a.dart"></script>'
83 '$dartJsTag' 85 '$dartJsTag'
84 }, { 86 }, {
85 'a|web/test.html': 87 'a|web/test.html':
86 '<!DOCTYPE html><html><head>' 88 '<!DOCTYPE html><html><head>'
87 '$WEB_COMPONENTS_TAG' 89 '$COMPATIBILITY_JS_TAGS'
88 '</head><body>' 90 '</head><body>'
89 '<script ${type}src="a.dart$ext"$async></script>' 91 '<script ${type}src="a.dart$ext"$async></script>'
90 '$dartJsTag' 92 '$dartJsTag'
91 '</body></html>', 93 '</body></html>',
92 }); 94 });
93 95
94 testPhases('dart_support.js after platform.js, dart_support present', phases, { 96 testPhases(
97 'dart_support.js after webcomponents.js, dart_support present', phases,
98 {
95 'a|web/test.html': 99 'a|web/test.html':
96 '<!DOCTYPE html><html><head>' 100 '<!DOCTYPE html><html><head>'
97 '$DART_SUPPORT_TAG' 101 '$DART_SUPPORT_TAG'
98 '</head><body>' 102 '</head><body>'
99 '<script type="application/dart" src="a.dart"></script>' 103 '<script type="application/dart" src="a.dart"></script>'
100 '$dartJsTag' 104 '$dartJsTag'
101 }, { 105 }, {
102 'a|web/test.html': 106 'a|web/test.html':
103 '<!DOCTYPE html><html><head>' 107 '<!DOCTYPE html><html><head>'
104 '$WEB_COMPONENTS_TAG' 108 '$COMPATIBILITY_JS_TAGS'
105 '</head><body>' 109 '</head><body>'
106 '<script ${type}src="a.dart$ext"$async></script>' 110 '<script ${type}src="a.dart$ext"$async></script>'
107 '$dartJsTag' 111 '$dartJsTag'
108 '</body></html>', 112 '</body></html>',
109 }); 113 });
110 114
111 var noPlatformPhases = [[new PolyfillInjector(new TransformOptions( 115 testPhases('platform.js -> webcomponents.js', phases,
112 directlyIncludeJS: js, injectPlatformJs: false))]]; 116 {
117 'a|web/test.html':
118 '<!DOCTYPE html><html><head>'
119 '$PLATFORM_JS_TAG'
120 '</head><body>'
121 '<script type="application/dart" src="a.dart"></script>'
122 '$dartJsTag'
123 }, {
124 'a|web/test.html':
125 '<!DOCTYPE html><html><head>'
126 '$COMPATIBILITY_JS_TAGS'
127 '</head><body>'
128 '<script ${type}src="a.dart$ext"$async></script>'
129 '$dartJsTag'
130 '</body></html>',
131 });
113 132
114 testPhases('with no platform.js', noPlatformPhases, { 133 var noWebComponentsPhases = [[new PolyfillInjector(new TransformOptions(
134 directlyIncludeJS: js, injectWebComponentsJs: false))]];
135
136 testPhases('with no webcomponents.js', noWebComponentsPhases, {
115 'a|web/test.html': 137 'a|web/test.html':
116 '<!DOCTYPE html><html><head></head><body>' 138 '<!DOCTYPE html><html><head></head><body>'
117 '<script type="application/dart" src="a.dart"></script>', 139 '<script type="application/dart" src="a.dart"></script>',
118 }, { 140 }, {
119 'a|web/test.html': 141 'a|web/test.html':
120 '<!DOCTYPE html><html><head>' 142 '<!DOCTYPE html><html><head>'
121 '$DART_SUPPORT_TAG' 143 '$DART_SUPPORT_TAG'
122 '</head><body>' 144 '</head><body>'
123 '<script ${type}src="a.dart$ext"$async></script>' 145 '<script ${type}src="a.dart$ext"$async></script>'
124 '$dartJsTag' 146 '$dartJsTag'
125 '</body></html>', 147 '</body></html>',
126 }); 148 });
127 } 149 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698