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

Side by Side Diff: test/build/import_crawler_test.dart

Issue 993423004: Fix normalization of relative paths inside of deep relative imports (Closed) Base URL: git@github.com:dart-lang/web-components.git@master
Patch Set: format Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « pubspec.yaml ('k') | test/build/import_inliner_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library web_components.test.build.import_crawler_test; 4 library web_components.test.build.import_crawler_test;
5 5
6 import 'dart:async'; 6 import 'dart:async';
7 import 'package:barback/barback.dart'; 7 import 'package:barback/barback.dart';
8 import 'package:code_transformers/tests.dart'; 8 import 'package:code_transformers/tests.dart';
9 import 'package:code_transformers/messages/build_logger.dart'; 9 import 'package:code_transformers/messages/build_logger.dart';
10 import 'package:html5lib/dom.dart' show Document; 10 import 'package:html5lib/dom.dart' show Document;
(...skipping 16 matching lines...) Expand all
27 if (_preParseDocument) { 27 if (_preParseDocument) {
28 return primaryInput.readAsString().then((html) { 28 return primaryInput.readAsString().then((html) {
29 var document = parseHtml(html, primaryInput.id.path); 29 var document = parseHtml(html, primaryInput.id.path);
30 return crawlDocument(transform, logger, document); 30 return crawlDocument(transform, logger, document);
31 }); 31 });
32 } else { 32 } else {
33 return crawlDocument(transform, logger); 33 return crawlDocument(transform, logger);
34 } 34 }
35 } 35 }
36 36
37 Future crawlDocument( 37 Future crawlDocument(Transform transform, BuildLogger logger,
38 Transform transform, BuildLogger logger, [Document document]) { 38 [Document document]) {
39 var primaryInput = transform.primaryInput; 39 var primaryInput = transform.primaryInput;
40 var crawler = new ImportCrawler( 40 var crawler = new ImportCrawler(transform, primaryInput.id, logger,
41 transform, primaryInput.id, logger, primaryDocument: document); 41 primaryDocument: document);
42 return crawler.crawlImports().then((docs) { 42 return crawler.crawlImports().then((docs) {
43 documents = docs; 43 documents = docs;
44 transform.addOutput(new Asset.fromString( 44 transform.addOutput(new Asset.fromString(
45 new AssetId('a', 'web/result.txt'), '${documents.keys}')); 45 new AssetId('a', 'web/result.txt'), '${documents.keys}'));
46 }); 46 });
47 } 47 }
48 } 48 }
49 49
50 main() { 50 main() {
51 useCompactVMConfiguration(); 51 useCompactVMConfiguration();
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 <link rel="import" href="three/zap.html"> 108 <link rel="import" href="three/zap.html">
109 <div>a|lib/one/two/baz.html</div>''', 109 <div>a|lib/one/two/baz.html</div>''',
110 'a|lib/one/two/three/zap.html': ''' 110 'a|lib/one/two/three/zap.html': '''
111 <div>a|lib/one/two/three/zap.html</div>''', 111 <div>a|lib/one/two/three/zap.html</div>''',
112 }, { 112 }, {
113 'a|web/result.txt': 113 'a|web/result.txt':
114 '(a|lib/one/two/three/zap.html, a|lib/one/two/baz.html, ' 114 '(a|lib/one/two/three/zap.html, a|lib/one/two/baz.html, '
115 'a|lib/one/bar.html, a|lib/foo.html, a|web/index.html)', 115 'a|lib/one/bar.html, a|lib/foo.html, a|web/index.html)',
116 }, [], StringFormatter.noNewlinesOrSurroundingWhitespace); 116 }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
117 } 117 }
OLDNEW
« no previous file with comments | « pubspec.yaml ('k') | test/build/import_inliner_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698