// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. library polymer.test.transform.script_compactor_test; import 'package:polymer/src/transform/script_compactor.dart'; import 'package:unittest/compact_vm_config.dart'; import 'common.dart'; void main() { useCompactVMConfiguration(); testPhases('no changes', [[new ScriptCompactor()]], { 'a|web/test.html': '', }, { 'a|web/test.html': '', }); testPhases('no changes outside web/', [[new ScriptCompactor()]], { 'a|lib/test.html': '
' '', }, { 'a|lib/test.html': '' '', }); testPhases('single script', [[new ScriptCompactor()]], { 'a|web/test.html': '' '', }, { 'a|web/test.html': '' '' '' '', 'a|web/test.html_bootstrap.dart': '''library app_bootstrap; import 'package:polymer/polymer.dart'; import 'dart:mirrors' show currentMirrorSystem; import 'a.dart' as i0; void main() { initPolymer([ 'a.dart', ], currentMirrorSystem().isolate.rootLibrary.uri.toString()); } '''.replaceAll('\n ', '\n'), }); testPhases('several scripts', [[new ScriptCompactor()]], { 'a|web/test.html': '' '' '' '