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

Unified Diff: test/build/import_inliner_test.dart

Issue 1014423002: add option to pass in bindings delimiters (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/build/import_inliner_test.dart
diff --git a/test/build/import_inliner_test.dart b/test/build/import_inliner_test.dart
index 7e060a282e61d0a90f406ce387256fa45dddef63..f0dbef62fecf9f1c1d2d0ef5b72be50a50bf1860 100644
--- a/test/build/import_inliner_test.dart
+++ b/test/build/import_inliner_test.dart
@@ -9,7 +9,7 @@ import 'package:web_components/build/messages.dart';
import 'package:unittest/compact_vm_config.dart';
import 'package:unittest/unittest.dart';
-var transformer = new ImportInlinerTransformer();
+var transformer = new ImportInlinerTransformer(null, ['{{', '[[']);
var phases = [[transformer]];
main() {
@@ -710,6 +710,24 @@ void urlAttributeTests() {
</body></html>''',
}, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+ testPhases('paths starting with a binding are treated as absolute', phases, {
+ 'a|web/test.html': '''
+ <!DOCTYPE html><html><head>
+ <link rel="import" href="packages/a/foo.html">
+ </head></html>''',
+ 'a|lib/foo.html': '''
+ <img _src="{{bar}}">
+ <img _src="[[bar]]">''',
+ }, {
+ 'a|web/test.html': '''
+ <!DOCTYPE html><html><head></head><body>
+ <div hidden="">
+ <img _src="{{bar}}">
+ <img _src="[[bar]]">
+ </div>
+ </body></html>''',
+ }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+
testPhases('arbitrary bindings can exist in paths', phases, {
'a|web/test.html': '''
<!DOCTYPE html><html><head></head><body>
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698