| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 library polymer.test.transform.polyfill_injector_test; |
| 6 |
| 7 import 'package:polymer/src/transform.dart'; |
| 8 import 'package:unittest/compact_vm_config.dart'; |
| 9 |
| 10 import 'common.dart'; |
| 11 |
| 12 void main() { |
| 13 useCompactVMConfiguration(); |
| 14 |
| 15 testPhases('no changes', [[new PolyfillInjector()]], { |
| 16 'a|web/test.html': '<!DOCTYPE html><html></html>', |
| 17 }, { |
| 18 'a|web/test.html': '<!DOCTYPE html><html></html>', |
| 19 }); |
| 20 |
| 21 testPhases('with some script', [[new PolyfillInjector()]], { |
| 22 'a|web/test.html': |
| 23 '<!DOCTYPE html><html><head></head><body>' |
| 24 '<script type="application/dart" src="a.dart"></script>', |
| 25 }, { |
| 26 'a|web/test.html': |
| 27 '<!DOCTYPE html><html><head></head><body>' |
| 28 '$SHADOW_DOM_TAG$INTEROP_TAG' |
| 29 '<script type="application/dart" src="a.dart"></script>' |
| 30 '</body></html>', |
| 31 }); |
| 32 |
| 33 testPhases('interop/shadow dom already present', [[new PolyfillInjector()]], { |
| 34 'a|web/test.html': |
| 35 '<!DOCTYPE html><html><head></head><body>' |
| 36 '<script type="application/dart" src="a.dart"></script>' |
| 37 '$SHADOW_DOM_TAG' |
| 38 '$INTEROP_TAG', |
| 39 }, { |
| 40 'a|web/test.html': |
| 41 '<!DOCTYPE html><html><head></head><body>' |
| 42 '<script type="application/dart" src="a.dart"></script>' |
| 43 '$SHADOW_DOM_TAG' |
| 44 '$INTEROP_TAG</body></html>', |
| 45 }); |
| 46 } |
| OLD | NEW |