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

Side by Side Diff: test/build/import_inliner_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 | « test/build/import_crawler_test.dart ('k') | test/custom_element_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_inliner_test; 4 library web_components.test.build.import_inliner_test;
5 5
6 import 'package:code_transformers/tests.dart'; 6 import 'package:code_transformers/tests.dart';
7 import 'package:web_components/build/import_inliner.dart'; 7 import 'package:web_components/build/import_inliner.dart';
8 import 'package:web_components/build/messages.dart'; 8 import 'package:web_components/build/messages.dart';
9 import 'package:unittest/compact_vm_config.dart'; 9 import 'package:unittest/compact_vm_config.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 'a|web/test.html': ''' 728 'a|web/test.html': '''
729 <!DOCTYPE html><html><head></head><body> 729 <!DOCTYPE html><html><head></head><body>
730 <img src="./{{bar[0]}}/{{baz[1]}}.{{extension}}"> 730 <img src="./{{bar[0]}}/{{baz[1]}}.{{extension}}">
731 </body></html>''', 731 </body></html>''',
732 }, { 732 }, {
733 'a|web/test.html': ''' 733 'a|web/test.html': '''
734 <!DOCTYPE html><html><head></head><body> 734 <!DOCTYPE html><html><head></head><body>
735 <img src="{{bar[0]}}/{{baz[1]}}.{{extension}}"> 735 <img src="{{bar[0]}}/{{baz[1]}}.{{extension}}">
736 </body></html>''', 736 </body></html>''',
737 }, null, StringFormatter.noNewlinesOrSurroundingWhitespace); 737 }, null, StringFormatter.noNewlinesOrSurroundingWhitespace);
738
739 testPhases('relative paths in deep imports', phases, {
740 'a|web/test.html': '''
741 <!DOCTYPE html><html><head>
742 <link rel="import" href="foo/foo.html">
743 </head></html>''',
744 'a|web/foo/foo.html': '''
745 <link rel="import" href="bar.html">''',
746 'a|web/foo/bar.html': '''
747 <style rel="stylesheet" href="baz.css"></style>
748 <style rel="stylesheet" href="../css/zap.css"></style>''',
749 'a|web/foo/baz.css': '',
750 'a|web/css/zap.css': '',
751 }, {
752 'a|web/test.html': '''
753 <!DOCTYPE html><html><head></head><body>
754 <div hidden="">
755 <style rel="stylesheet" href="foo/baz.css"></style>
756 <style rel="stylesheet" href="css/zap.css"></style>
757 </div>
758 </body></html>''',
759 }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
738 } 760 }
739 761
740 void entryPointTests() { 762 void entryPointTests() {
741 testPhases('one level deep entry points normalize correctly', phases, { 763 testPhases('one level deep entry points normalize correctly', phases, {
742 'a|web/test/test.html': ''' 764 'a|web/test/test.html': '''
743 <!DOCTYPE html><html><head> 765 <!DOCTYPE html><html><head>
744 <link rel="import" href="../../packages/a/foo/foo.html"> 766 <link rel="import" href="../../packages/a/foo/foo.html">
745 </head></html>''', 767 </head></html>''',
746 'a|lib/foo/foo.html': ''' 768 'a|lib/foo/foo.html': '''
747 <script rel="import" href="../../../packages/b/bar/bar.js"> 769 <script rel="import" href="../../../packages/b/bar/bar.js">
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 console.log("here");''', 805 console.log("here");''',
784 }, { 806 }, {
785 'a|web/test/well/test.html': ''' 807 'a|web/test/well/test.html': '''
786 <!DOCTYPE html><html><head></head><body> 808 <!DOCTYPE html><html><head></head><body>
787 <div hidden=""> 809 <div hidden="">
788 <script rel="import" href="../../packages/b/bar/bar.js"></script> 810 <script rel="import" href="../../packages/b/bar/bar.js"></script>
789 </div> 811 </div>
790 </body></html>''', 812 </body></html>''',
791 }, [], StringFormatter.noNewlinesOrSurroundingWhitespace); 813 }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
792 } 814 }
OLDNEW
« no previous file with comments | « test/build/import_crawler_test.dart ('k') | test/custom_element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698