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

Side by Side Diff: pkg/polymer/test/build/import_inliner_test.dart

Issue 178193007: [polymer] fix import inliner to only rewrite URL attributes once per node (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « pkg/polymer/test/build/common.dart ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 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 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 4
5 library polymer.test.build.import_inliner_test; 5 library polymer.test.build.import_inliner_test;
6 6
7 import 'package:polymer/src/build/common.dart'; 7 import 'package:polymer/src/build/common.dart';
8 import 'package:polymer/src/build/import_inliner.dart'; 8 import 'package:polymer/src/build/import_inliner.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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 '</style>' 636 '</style>'
637 '</polymer-element>' 637 '</polymer-element>'
638 '</body></html>', 638 '</body></html>',
639 'b|asset/test3.css': 639 'b|asset/test3.css':
640 'body {\n background: #eaeaea url("assets/b/test4.png");\n}\n' 640 'body {\n background: #eaeaea url("assets/b/test4.png");\n}\n'
641 '.foo {\n background: url("../../packages/c/test5.png");\n}', 641 '.foo {\n background: url("../../packages/c/test5.png");\n}',
642 'b|asset/test4.png': 'PNG', 642 'b|asset/test4.png': 'PNG',
643 'c|lib/test5.png': 'PNG', 643 'c|lib/test5.png': 'PNG',
644 }); 644 });
645 645
646 testPhases('deep, inlines css, multiple nesting', phases, {
647 'a|web/test.html':
648 '<!DOCTYPE html><html><head>'
649 '<link rel="import" href="foo/test2.html">'
650 '</head></html>',
651 'a|web/foo/test2.html':
652 '<link rel="import" href="bar/test3.html">'
653 '<polymer-element>2'
654 '<link rel="stylesheet" href="test.css">'
655 '</polymer-element>',
656 'a|web/foo/bar/test3.html':
657 '<img src="qux.png">',
658 'a|web/foo/test.css':
659 'body {\n background: #eaeaea url("test4.png");\n}\n'
660 '.foo {\n background: url("test5.png");\n}',
661 }, {
662 'a|web/test.html':
663 '<!DOCTYPE html><html><head></head><body>'
664 '<img src="foo/bar/qux.png">'
665 '<polymer-element>2'
666 '<style>'
667 'body {\n background: #eaeaea url(foo/test4.png);\n}\n'
668 '.foo {\n background: url(foo/test5.png);\n}'
669 '</style></polymer-element></body></html>',
670 'a|web/foo/test2.html':
671 '<html><head></head><body>'
672 '<img src="bar/qux.png">'
673 '<polymer-element>2'
674 '<style>'
675 'body {\n background: #eaeaea url(test4.png);\n}\n'
676 '.foo {\n background: url(test5.png);\n}'
677 '</style></polymer-element></body></html>',
678 'a|web/foo/bar/test3.html':
679 '<img src="qux.png">',
680 'a|web/foo/test.css':
681 'body {\n background: #eaeaea url("test4.png");\n}\n'
682 '.foo {\n background: url("test5.png");\n}',
683 });
646 684
647 testPhases('shallow, inlines css and preserves order', phases, { 685 testPhases('shallow, inlines css and preserves order', phases, {
648 'a|web/test.html': 686 'a|web/test.html':
649 '<!DOCTYPE html><html><head>' 687 '<!DOCTYPE html><html><head>'
650 '<style>.first { color: black }</style>' 688 '<style>.first { color: black }</style>'
651 '<link rel="stylesheet" href="test2.css">' 689 '<link rel="stylesheet" href="test2.css">'
652 '<style>.second { color: black }</style>' 690 '<style>.second { color: black }</style>'
653 '</head></html>', 691 '</head></html>',
654 'a|web/test2.css': 692 'a|web/test2.css':
655 'h1 { font-size: 70px; }', 693 'h1 { font-size: 70px; }',
656 }, { 694 }, {
657 'a|web/test.html': 695 'a|web/test.html':
658 '<!DOCTYPE html><html><head></head><body>' 696 '<!DOCTYPE html><html><head></head><body>'
659 '<style>.first { color: black }</style>' 697 '<style>.first { color: black }</style>'
660 '<style>h1 { font-size: 70px; }</style>' 698 '<style>h1 { font-size: 70px; }</style>'
661 '<style>.second { color: black }</style>' 699 '<style>.second { color: black }</style>'
662 '</body></html>', 700 '</body></html>',
663 'a|web/test.html.scriptUrls': '[]', 701 'a|web/test.html.scriptUrls': '[]',
664 'a|web/test2.css': 702 'a|web/test2.css':
665 'h1 { font-size: 70px; }', 703 'h1 { font-size: 70px; }',
666 }); 704 });
667 705
668 } 706 }
OLDNEW
« no previous file with comments | « pkg/polymer/test/build/common.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698