Chromium Code Reviews| Index: pkg/polymer/test/build/import_inliner_test.dart |
| diff --git a/pkg/polymer/test/build/import_inliner_test.dart b/pkg/polymer/test/build/import_inliner_test.dart |
| index a891a123a35aaffaef22d23cc618263aca298fad..63d9528bea324d46f45a152c1bf3a6212cf0eb83 100644 |
| --- a/pkg/polymer/test/build/import_inliner_test.dart |
| +++ b/pkg/polymer/test/build/import_inliner_test.dart |
| @@ -169,6 +169,31 @@ void importTests() { |
| 'a|web/second.js': '/*second*/' |
| }); |
| + testLogOutput( |
| + (options) => new ImportInliner(options), |
| + 'removes duplicate scripts', |
| + { |
|
Siggi Cherem (dart-lang)
2014/10/21 17:06:03
nit: move this char to the prev line? (consistency
jakemac
2014/10/21 18:14:01
Done.
|
| + 'a|web/test.html': |
| + '<!DOCTYPE html><html><head>' |
| + '<link rel="import" href="x_a.html">' |
| + '<link rel="import" href="x_b.html">' |
| + '</head></html>', |
| + 'a|web/x_a.html': |
| + '<!DOCTYPE html>' |
| + '<script type="application/dart" src="foo.dart"></script>', |
|
Siggi Cherem (dart-lang)
2014/10/21 17:06:03
minor silly thing - because the example you have i
jakemac
2014/10/21 18:14:01
Done.
|
| + 'a|web/x_b.html': |
| + '<!DOCTYPE html>' |
| + '<script type="application/dart" src="foo.dart"></script>', |
| + 'a|web/foo.dart': 'var i = 0;' |
| + }, { |
| + 'a|web/test.html': |
| + '<!DOCTYPE html><html><head></head><body></body></html>', |
| + 'a|web/test.html._data': expectedData(['web/foo.dart']), |
| + }, [ |
| + 'warning: ${SCRIPT_INCLUDED_MORE_THAN_ONCE.create({'url': 'foo.dart'}) |
| + .snippet} (web/x_b.html 0 15)' |
| + ]); |
| + |
| final cspPhases = [[new ImportInliner( |
| new TransformOptions(contentSecurityPolicy: true))]]; |
| testPhases('extract Js scripts in CSP mode', cspPhases, |