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

Unified Diff: pkg/polymer/test/build/polyfill_injector_test.dart

Issue 29823005: fixes to polymer, gets tests back to a stable state (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/polymer/test/build/all_phases_test.dart ('k') | pkg/polymer/test/instance_attrs_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/test/build/polyfill_injector_test.dart
diff --git a/pkg/polymer/test/build/polyfill_injector_test.dart b/pkg/polymer/test/build/polyfill_injector_test.dart
index 5f6b42e925698ed417bc0d820e6fc35fe2c7f959..9cbd333cec5859621d19fb6f052f4b8d05dfbd24 100644
--- a/pkg/polymer/test/build/polyfill_injector_test.dart
+++ b/pkg/polymer/test/build/polyfill_injector_test.dart
@@ -7,12 +7,25 @@ library polymer.test.build.polyfill_injector_test;
import 'package:polymer/src/build/common.dart';
import 'package:polymer/src/build/polyfill_injector.dart';
import 'package:unittest/compact_vm_config.dart';
+import 'package:unittest/unittest.dart';
import 'common.dart';
void main() {
useCompactVMConfiguration();
- var phases = [[new PolyfillInjector(new TransformOptions())]];
+
+ group('js', () => runTests());
+ group('csp', () => runTests(csp: true));
+ group('dart', () => runTests(js: false));
+}
+
+void runTests({bool js: true, bool csp: false}) {
+ var phases = [[new PolyfillInjector(new TransformOptions(
+ directlyIncludeJS: js,
+ contentSecurityPolicy: csp))]];
+
+ var ext = js ? (csp ? '.precompiled.js' : '.js') : '';
+ var type = js ? '' : 'type="application/dart" ';
testPhases('no changes', phases, {
'a|web/test.html': '<!DOCTYPE html><html></html>',
@@ -38,7 +51,7 @@ void main() {
'a|web/test.html':
'<!DOCTYPE html><html><head></head><body>'
'$SHADOW_DOM_TAG$CUSTOM_ELEMENT_TAG$INTEROP_TAG'
- '<script type="application/dart" src="a.dart"></script>'
+ '<script ${type}src="a.dart$ext"></script>'
'</body></html>',
});
@@ -52,7 +65,7 @@ void main() {
}, {
'a|web/test.html':
'<!DOCTYPE html><html><head></head><body>'
- '<script type="application/dart" src="a.dart"></script>'
+ '<script ${type}src="a.dart$ext"></script>'
'$SHADOW_DOM_TAG'
'$CUSTOM_ELEMENT_TAG'
'$INTEROP_TAG'
« no previous file with comments | « pkg/polymer/test/build/all_phases_test.dart ('k') | pkg/polymer/test/instance_attrs_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698