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

Unified Diff: pkg/polymer/test/build/import_inliner_test.dart

Issue 423713005: add support for _* versions of the url-like attributes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: added tests and shortened link Created 6 years, 5 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 | « pkg/polymer/lib/src/build/import_inliner.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f6daa409ff7a720a50bf6723a0b76aa3e33bcd95..b8d0c0d75e08e31f8802b388b716787cad294168 100644
--- a/pkg/polymer/test/build/import_inliner_test.dart
+++ b/pkg/polymer/test/build/import_inliner_test.dart
@@ -883,6 +883,38 @@ void urlAttributeTests() {
'<img src="foo/{{bar}}">'
'</body></html>',
});
+
+ testPhases('relative paths in _* attributes are normalized', phases, {
+ 'a|web/test.html':
+ '<!DOCTYPE html><html><head>'
+ '<link rel="import" href="foo/test.html">'
+ '</head></html>',
+ 'a|web/foo/test.html':
+ '<img _src="./{{bar}}">'
+ '<a _href="./{{bar}}">test</a>',
+ }, {
+ 'a|web/test.html':
+ '<!DOCTYPE html><html><head></head><body>'
+ '<img _src="foo/{{bar}}">'
+ '<a _href="foo/{{bar}}">test</a>'
+ '</body></html>',
+ });
+
+ testPhases('warnings are given about _* attributes', phases, {
+ 'a|web/test.html':
+ '<!DOCTYPE html><html><head></head><body>'
+ '<img src="foo/{{bar}}">'
+ '<a _href="foo/bar">test</a>'
+ '</body></html>',
+ }, {}, [
+ 'warning: When using bindings with the "src" attribute you may '
+ 'experience errors in certain browsers. Please use the "_src" '
+ 'attribute instead. For more information, see http://goo.gl/5av8cU '
+ '(web/test.html 0 40)',
+ 'warning: The "_href" attribute is only supported when using bindings. '
+ 'Please change to the "href" attribute. (web/test.html 0 63)',
+
+ ]);
}
void entryPointTests() {
« no previous file with comments | « pkg/polymer/lib/src/build/import_inliner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698